Example #1
0
        public void T20_TestWhileToCreate2DimArray()
        {
            // Assert.Fail("1463672 - Sprint 20 : rev 2140 : 'array' seems to be reserved as a keyword in a specific case ! ");

            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T20_TestWhileToCreate2DimArray.ds");

            Object[] v1 = new Object[] { new Object[] { 1, 2 }, new Object[] { 1, 2 } };

            thisTest.Verify("x", v1);
        }
Example #2
0
        public void T01_TestImpInsideImp()
        {
            Assert.Throws(typeof(ProtoCore.Exceptions.CompileErrorsOccured), () =>
            {
                ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T01_TestImpInsideImp.ds");

                // thisTest.Verify("x", 5);
                // thisTest.Verify("y", 5);
            });
        }
        public void Collection_Assignment_1()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(filePath, "Collection_Assignment_1.ds");


            object[] expectedResult2 = { 1, 2 };
            object[] expectedResult3 = { 2, 2 };

            thisTest.Verify("c", -2, 0);
            thisTest.Verify("d", expectedResult2, 0);
            thisTest.Verify("e", expectedResult3, 0);
        }
Example #4
0
        public void T48_MultipleAssignments()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T48_MultipleAssignments.ds");

            thisTest.Verify("a", 4);
            thisTest.Verify("b", 4);

            thisTest.Verify("x", 5);
            thisTest.Verify("y", 5);

            thisTest.Verify("b1", 9);
        }
        public void T011_Inline_Using_Variables()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T011_Inline_Using_Variables.ds");
            Object          n1     = null;

            thisTest.Verify("x1", -1);
            thisTest.Verify("x2", true);
            thisTest.Verify("x4", 1);
            thisTest.Verify("x5", 1);
            thisTest.Verify("x3", 1);
            thisTest.Verify("temp", n1);
        }
Example #6
0
        public void T80580_BuiltinFunc_1()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T80580_BuiltinFunc_1.ds");

            Object[] v1 = new Object[] { 1, 2, 3, 4, 0 };
            Object[] v2 = new Object[] { 3, 4 };
            Object[] v3 = new Object[] { -4, 5 };
            Object[] v4 = new Object[] { v2, v3 };
            Object[] v5 = new Object[] { 1.1 };
            Object[] v6 = new Object[] { 2.3, 3 };
            Object[] v7 = new Object[] { "5" };
            Object[] v8 = new Object[] { true };
            Object[] v9 = new Object[] { v5, v6, v7, v8 };



            thisTest.Verify("t1", v1);
            thisTest.Verify("t2", 3);
            thisTest.Verify("t3", true);
            thisTest.Verify("t4", 2);
            thisTest.Verify("t5", 2);
            thisTest.Verify("t6", true);
            thisTest.Verify("t7", true);
            thisTest.Verify("t8", "{true,{false,false},true}");
            thisTest.Verify("t9", v4);
            thisTest.Verify("t10", 3);
            thisTest.Verify("t11", 4);
            thisTest.Verify("t12", 2.3025850929940459);
            thisTest.Verify("t13", 5.0);
            thisTest.Verify("t14", 1.0);
            thisTest.Verify("t15", v9);
        }
        public void T80580_BuiltinFunc_1()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T80580_BuiltinFunc_1.ds");

            Object[] v1 = new Object[] { 1, 2, 3, 4, 0 };
            Object[] v2 = new Object[] { 3, 4 };
            Object[] v3 = new Object[] { -4, 5 };
            Object[] v4 = new Object[] { v2, v3 };


            thisTest.Verify("t1", v1);
            thisTest.Verify("t2", 3);
            thisTest.Verify("t3", true);
            thisTest.Verify("t4", 2);
            thisTest.Verify("t5", 2);
            thisTest.Verify("t6", true);
            thisTest.Verify("t7", true);
            thisTest.Verify("t8", "{true,{false,false},true}");
            thisTest.Verify("t9", v4);
        }
        public void T01_TestVariousTypes()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T01_TestVariousTypes.ds");

            thisTest.Verify("i1", 5);
            thisTest.Verify("d1", 5.2);
            thisTest.Verify("isTrue1", true);
            thisTest.Verify("isFalse1", false);
            thisTest.Verify("x1", 3);
            thisTest.Verify("b1", 5);
            thisTest.Verify("x11", 2);
            thisTest.Verify("y1", 2.0);

            thisTest.Verify("i2", 5);
            thisTest.Verify("d2", 5.2);
            thisTest.Verify("isTrue2", true);
            thisTest.Verify("isFalse2", false);
            thisTest.Verify("x2", 3);
            thisTest.Verify("b2", 5);
            thisTest.Verify("x12", 2);
            thisTest.Verify("y2", 2.0);
        }
Example #9
0
        public void T001_BasicImport_CurrentDirectory()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T001_BasicImport_CurrentDirectory.ds");


            object[] expectedC = { 2.2, 4.4 };

            thisTest.Verify("c", expectedC);
        }
Example #10
0
        public void Z001_Associative_Function_Regress_1454696()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(filePath, "Z001_Associative_Function_Regress_1454696.ds");

            thisTest.Verify("arr2", 1.0);
        }
        public void T01_BasicGlobalFunction()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T01_BasicGlobalFunction.ds");
            object          b      = 3;

            thisTest.Verify("b", b);
        }
Example #12
0
        public void Fibunacci()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "Fibonacci.ds");

            thisTest.Verify("fib10_r", 10946);
            thisTest.Verify("fib10_i", 10946);
        }
Example #13
0
        public void T001_Associative_Class_Property_Int()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T001_Associative_Class_Property_Int.ds");

            thisTest.Verify("xPoint", 1);
            thisTest.Verify("yPoint", 2);
            thisTest.Verify("zPoint", 3);
        }
Example #14
0
        public void T01_TestGCArray()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T01_TestGCArray.ds");

            thisTest.Verify("v1", 4);
            thisTest.Verify("v2", 5);
            thisTest.Verify("v3", 6);
        }
Example #15
0
        public void T019_LanguageBlockScope_ImperativeNestedAssociative_Function()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(filePath, "T019_LanguageBlockScope_ImperativeNestedAssociative_Function.ds");

            thisTest.Verify("z", 10);
        }
Example #16
0
 public void T001_implicit_programming_Robert()
 {
     Assert.Throws(typeof(ProtoCore.Exceptions.CompileErrorsOccured), () =>
     {
         ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T001_implicit_programming_Robert.ds");
         thisTest.Verify("a", 13);
         thisTest.Verify("b", 26);
         thisTest.Verify("c", 22);
     });
 }
Example #17
0
        public void T001_Simple_Update()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T001_Simple_Update.ds");

            //Verification
            thisTest.Verify("a", 2, 0);
            thisTest.Verify("b", 3, 0);
        }
Example #18
0
        public void T01_String_IfElse_1()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T01_String_IfElse_1.ds");

            TestFrameWork.Verify(mirror, "result", false, 0);
        }
Example #19
0
        public void T33_ForLoopToReplaceReplicationGuides()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T33_ForLoopToReplaceReplicationGuides.ds");

            thisTest.Verify("a1", 4, 0);
            thisTest.Verify("a2", 5, 0);
            thisTest.Verify("a3", 5, 0);
            thisTest.Verify("a4", 6, 0);
        }
Example #20
0
 public void T56_Defect_1460162()
 {
     ExecutionMirror mirror = thisTest.RunScriptFile(testPath, "T56_Defect_1460162.ds");
     object          v1     = null;
 }
Example #21
0
        public void T00001_Language_001_Variable_Expression_1()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "T00001_Language_001_Variable_Expression_1.ds");

            Object[] v1 = new Object[] { 1, 3, 5, 7, 9 };
            thisTest.Verify("A", v1, 0);
        }
Example #22
0
        public void T001_FFI_MathLibrary_Sqrt_Trigonomatry()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(FFIPath, "T001_FFI_MathLibrary_Sqrt_Trigonomatry.ds");

            thisTest.Verify("sqrt_10", 3.162278, 1);
            thisTest.Verify("log_100", 4.605170, 1);
            thisTest.Verify("angle", 30.0, 1);
            thisTest.Verify("sin_30", 0.5, 1);
            thisTest.Verify("cos_30", 0.866025, 1);
            thisTest.Verify("tan_30", 0.577350, 1);
            thisTest.Verify("asin_30", 30.0, 1);
            thisTest.Verify("acos_30", 30.0, 1);
            thisTest.Verify("atan_30", 30.0, 1);
        }
Example #23
0
        public void Regress_1455643()
        {
            ExecutionMirror mirror = thisTest.RunScriptFile(testCasePath, "Regress_1455643.ds");

            thisTest.Verify("areEqual1", true);
            thisTest.Verify("areEqual2", false);
        }