public void T01_TestGCArray() { string code = @" import(""DisposeVerify.ds""); v1; v2; v3; [Imperative] { DisposeVerify.x = 1; arr = { A.A(), A.A(), A.A() }; arr = 3; v1 = DisposeVerify.x; // 4 a1 = A.A(); arr = { a1, A.A() }; arr = 3; v2 = DisposeVerify.x; // 5 def foo : int(a : A[]) { return = 10; } a2 = A.A(); a = foo( { a1, a2 }); a2 = A.A(); v3 = DisposeVerify.x; // 6 } v4 = DisposeVerify.x; "; ExecutionMirror mirror = thisTest.RunScriptSource(code, "", testCasePath); if (thisTest.GetTestCore().Heap.GCStrategy == ProtoCore.DSASM.Heap.GCStrategies.kMarkAndSweep) { thisTest.Verify("v4", 8); } else { thisTest.Verify("v1", 4); thisTest.Verify("v2", 5); thisTest.Verify("v3", 6); } }
public void TestCBNEngineTests() { String code = @" [Associative] { foo=5; } "; ExecutionMirror mirror = thisTest.RunScriptSource(code); ProtoCore.Core core = thisTest.GetTestCore(); Guid guid = RunDSScriptInCBN(code); ProtoCore.Core dynamoCore = ViewModel.Model.EngineController.LiveRunnerCore; CompareCores(core, dynamoCore, guid); }