예제 #1
0
        public bool Run()
        {
            Init();
            mainScope.Run();

            // mainScope: v0 => 4
            // functionScope: v0 => 512
            // functionScope: v1 => 128

            if ((int)mainScope.SubScopes[0].VariableTable[0].Value != 512)
            {
                return(false);
            }

            if ((int)mainScope.SubScopes[0].VariableTable[1].Value != 128)
            {
                return(false);
            }

            if ((int)mainScope.VariableTable[0].Value != 4)
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
        public bool Run()
        {
            Init();

            mainScope.Run();
            return(mainScope.InstructionPointer == 4);
        }
예제 #3
0
        public bool Run()
        {
            Init();
            scope1.Run();
            scope2.Run();

            if ((int)scope1.VariableTable[1].Value != 99)
            {
                return(false);
            }

            if ((int)scope2.VariableTable[1].Value == 99)
            {
                return(false);
            }

            return(true);
        }
예제 #4
0
        public bool Run()
        {
            Init();
            mainScope.Run();

            try
            {
                if ((string)mainScope.VariableTable[0].Value != "Quiere un botella o una vaso?")
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }

            return(true);
        }
예제 #5
0
        public bool Run()
        {
            Init();
            mainScope.Run();

            try
            {
                if ((int)mainScope.VariableTable[0].Value != 44)
                {
                    return(false);
                }

                if ((double)mainScope.VariableTable[1].Value != 999.91)
                {
                    return(false);
                }

                if ((double)mainScope.VariableTable[1].Value == 119.19)
                {
                    return(false);
                }

                if ((byte)mainScope.VariableTable[2].Value != 241)
                {
                    return(false);
                }

                if ((string)mainScope.VariableTable[3].Value != "The new valUe")
                {
                    return(false);
                }
            } catch
            {
                return(false);
            }

            return(true);
        }
예제 #6
0
        public bool Run()
        {
            Init();
            mainScope.Run();

            try
            {
                if ((int)mainScope.VariableTable[0].Value != 57)
                {
                    return(false);
                }

                if ((int)mainScope.VariableTable[1].Value != 5)
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }

            return(true);
        }