public void VariableDefiningTest()
        {
            string variableDefinition = "double x = 4";

            InstructionsBlock block = new InstructionsBlock();

            var declaration = new VariableDeclarationInstruction(variableDefinition, block);

            declaration.Execute();

            Assert.AreEqual(typeof(double), block.localVariables["x"].type);
            Assert.AreEqual(4.0, block.localVariables["x"].value);
        }
        public void UsingPreDeclaredVarInArythemicStatement()
        {
            InstructionsBlock block = new InstructionsBlock();

            string variableDefinition = "int x = 4";
            var declaration = new VariableDeclarationInstruction(variableDefinition, block);

            string variableDefinition2 = "int y = 7 + x";
            var declaration2 = new VariableDeclarationInstruction(variableDefinition2, block);

            declaration.Execute();
            declaration2.Execute();

            Assert.AreEqual(typeof(int), block.localVariables["x"].type);
            Assert.AreEqual(4.0, block.localVariables["x"].value);

            Assert.AreEqual(typeof(int), block.localVariables["y"].type);
            Assert.AreEqual(11.0, block.localVariables["y"].value);
        }