public void T029_Associative_Class_Property_AccessModifier() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Associative\\Class\\T029_Associative_Class_Property_AccessModifier.ds"); TestFrameWork.VerifyBuildWarning(ProtoCore.BuildData.WarningID.kAccessViolation); thisTest.VerifyBuildWarningCount(1); }
public void T01_WhileBreakContinue() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Imperative\\BreakContinue\\T01_WhileBreakContinue.ds"); Assert.IsTrue((Int64)mirror.GetValue("x").Payload == 11); Assert.IsTrue((Int64)mirror.GetValue("y").Payload == 5); }
public void T001_Inline_Using_Function_Call() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Associative\\InlineCondition\\T001_Inline_Using_Function_Call.ds"); // expected "StatementUsedInAssignment" warning Assert.IsTrue((Int64)mirror.GetValue("smallest2").Payload == 100); Assert.IsTrue((Int64)mirror.GetValue("largest2").Payload == 400); }
public void T036_Defect_1467491() { string errmsg = "DNL-1467336 Rev 3971 :global and local scope identifiers of same name causing cyclic dependency issue"; thisTest.RunScript(testCasePath + "T031_Defect_1467491_ImportUpdate_Main.ds", errmsg); thisTest.Verify("z", 6); }
[Test, Ignore] // Jun: Ignore for now until we allow deeply nested function definitions public void TestTryCatchStackUnwinding01() { ExecutionMirror mirror = thisTest.RunScript(testCasePath + "TestTryCatchStackUnwinding01.ds"); Assert.IsTrue((Int64)mirror.GetValue("y1").Payload == 1); Assert.IsTrue((Int64)mirror.GetValue("y2").Payload == 2); Assert.IsTrue((Int64)mirror.GetValue("y3").Payload == 3); Assert.IsTrue((Int64)mirror.GetValue("y4").Payload == 4); Assert.IsTrue((Int64)mirror.GetValue("y5").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y6").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y7").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y8").Payload == 8); Assert.IsTrue((Int64)mirror.GetValue("y9").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y10").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y11").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y12").Payload == 0); Assert.IsTrue((Int64)mirror.GetValue("y13").Payload == 13); }
public void T001_LanguageBlockScope_AssociativeNestedAssociative() // It may not make sense to do so. Could treat as a negative case { Assert.Throws(typeof(ProtoCore.Exceptions.CompileErrorsOccured), () => { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\MultiLanguage\\Scope\\T001_LanguageBlockScope_AssociativeNestedAssociative.ds"); //Assert.IsTrue((Int64)mirror.GetValue("a_inner", 2).Payload == 10); //Assert.IsTrue(System.Convert.ToBoolean(mirror.GetValue("b_inner", 2).Payload) == true); //Assert.IsTrue((double)mirror.GetValue("c_inner", 2).Payload == 20.1); }); }
public void T001_Associative_Function_Simple() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Associative\\Function\\T001_Associative_Function_Simple.ds"); Assert.IsTrue((Int64)mirror.GetValue("a").Payload == 1); Assert.IsTrue((Int64)mirror.GetValue("b").Payload == 10); Assert.IsTrue((Int64)mirror.GetValue("sum").Payload == 11); }
public void T01_TestNegativeSyntax_Negative() { Assert.Throws(typeof(ProtoCore.Exceptions.CompileErrorsOccured), () => { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Imperative\\ForLoop\\T01_TestNegativeSyntax_Negative.ds"); }); }
public void T02_TestAssocInsideImp() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Imperative\\BlockSyntax\\T02_TestAssocInsideImp.ds"); Assert.IsTrue((Int64)mirror.GetValue("x").Payload == 35); Assert.IsTrue((Int64)mirror.GetValue("z").Payload == 35); Assert.IsTrue((Int64)mirror.GetValue("y").Payload == 5); Assert.IsTrue(mirror.GetValue("w").DsasmValue.optype == ProtoCore.DSASM.AddressType.Null); Assert.IsTrue(mirror.GetValue("f").DsasmValue.optype == ProtoCore.DSASM.AddressType.Null); }
public void T01_TestAllPassCondition() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Imperative\\IfStatement\\T01_TestAllPassCondition.ds"); Object o = mirror.GetValue("x").Payload; ProtoCore.DSASM.Mirror.DsasmArray x = (ProtoCore.DSASM.Mirror.DsasmArray)o; Assert.IsTrue((Int64)x.members[0].Payload == 1); Assert.IsTrue((Int64)x.members[1].Payload == 1); Assert.IsTrue((Int64)x.members[2].Payload == 1); Assert.IsTrue((Int64)x.members[3].Payload == 1); Object o1 = mirror.GetValue("y").Payload; ProtoCore.DSASM.Mirror.DsasmArray y = (ProtoCore.DSASM.Mirror.DsasmArray)o1; Assert.IsTrue((Int64)y.members[0].Payload == 1); Assert.IsTrue((Int64)y.members[1].Payload == 1); Assert.IsTrue((Int64)y.members[2].Payload == 1); Assert.IsTrue((Int64)y.members[3].Payload == 1); Assert.IsTrue((Int64)y.members[4].Payload == 1); Object o2 = mirror.GetValue("z").Payload; ProtoCore.DSASM.Mirror.DsasmArray z = (ProtoCore.DSASM.Mirror.DsasmArray)o2; Assert.IsTrue((Int64)z.members[0].Payload == 1); Assert.IsTrue((Int64)z.members[1].Payload == 1); Assert.IsTrue((Int64)z.members[2].Payload == 1); Assert.IsTrue((Int64)z.members[3].Payload == 1); }
public void T02_SampleTestUsingCodeFromExternalFile() { ExecutionMirror mirror = thisTest.RunScript(@"..\\..\\..\\Scripts\\TD\\Associative\\Assignment\\T02_SampleTestUsingCodeFromExternalFile.ds"); Assert.IsTrue((Int64)mirror.GetValue("variable").Payload == 5); }