From: <sr...@us...> - 2006-02-13 22:04:10
|
Revision: 589 Author: srmitch Date: 2006-02-13 14:03:48 -0800 (Mon, 13 Feb 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=589&view=rev Log Message: ----------- Changed last test submitted to emulate the retrieve behavior so that it does not run by default as it crashes GUITestRunner with stack overflow. Left in for future consideration by changing class visibility to public. Modified Paths: -------------- trunk/Source/Tests/TestInstantReferences.pas Modified: trunk/Source/Tests/TestInstantReferences.pas =================================================================== --- trunk/Source/Tests/TestInstantReferences.pas 2006-02-13 17:57:13 UTC (rev 588) +++ trunk/Source/Tests/TestInstantReferences.pas 2006-02-13 22:03:48 UTC (rev 589) @@ -46,6 +46,13 @@ public procedure SetUp; override; procedure TearDown; override; + + // Emulate the retrieve behavior + // Feb 2006 - IO Beta 2 + // Do not run by default as it crashes + // GUITestRunner with stack overflow. + // Left here for future consideration. + procedure TestCircularReferencesRetrieve; published procedure TestAddEmbeddedObject; procedure TestAddExternalObject; @@ -71,8 +78,6 @@ // + -> D -> E // then delete E procedure TestCircularReferences5; - //Emulate the retrive behavior - procedure TestCircularReferencesRetrive; end; TestTInstantEmbReferences = class(TTestCase) @@ -506,9 +511,9 @@ vProject2: TProject; vPerson2: TPerson; begin - FOwner.Name := 'Owner'; + FOwner.Name := 'Owner'; // B - vPerson := TPerson.Create(FConn); + vPerson := TPerson.Create(FConn); // A try AssertNotNull(vPerson); vPerson.Name := 'vPerson'; @@ -518,7 +523,7 @@ AssertEquals('vPerson.Employer.Name A', 'Owner', vPerson.Employer.Name); FOwner.DeleteEmployee(0); - vProject1 := TProject.Create(FConn); + vProject1 := TProject.Create(FConn); // C try AssertNotNull(vProject1); vProject1.Name := 'vProject1'; @@ -528,11 +533,11 @@ vProject1.Free; end; - vProject2 := TProject.Create(FConn); + vProject2 := TProject.Create(FConn); // D try AssertNotNull(vProject2); vProject2.Name := 'vProject2'; - vPerson2 := TPerson.Create(FConn); + vPerson2 := TPerson.Create(FConn); // E try AssertNotNull(vPerson2); vPerson2.Name := 'vPerson2'; @@ -585,7 +590,7 @@ end; end; -procedure TestTInstantReferences_Leak.TestCircularReferencesRetrive; +procedure TestTInstantReferences_Leak.TestCircularReferencesRetrieve; var vPerson1: TPerson; vPerson2: TPerson; @@ -613,15 +618,15 @@ vPerson2 := TPerson.Create(FConn); //D try - AssertNotNull(vPerson1); - vPerson2.Name := 'vPerson1'; + AssertNotNull(vPerson2); + vPerson2.Name := 'vPerson2'; //A -> B -> C -> A // | // +-> D vPerson2.EmployBy(FOwner); AssertNotNull(vPerson2.Employer); AssertEquals('vPerson2.Employer.Name A', 'Owner', vPerson2.Employer.Name); - //Decrement the RefCount to emulate the Retrive constructor + //Decrement the RefCount to emulate the Retrieve constructor FOwner.Release; vPerson1.Release; finally |