public void TestMultipleAssign()
        {
            var scope    = new SubordinateScope(new EmptyScope());
            var declare0 = new VariableDeclaration("a", scope, MiniType.Int);
            var declare1 = new VariableDeclaration("b", scope, MiniType.Int);
            var declare2 = new VariableDeclaration("c", scope, MiniType.Int);

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block()
            {
                declare0,
                declare1,
                declare2,
                Operator.Create(Token.Assign, MiniType.Int, MiniType.Int)
                .WithLeft <Operator, TypeNode>(new VariableReference(declare1))
                .WithRight <Operator, TypeNode>(
                    Operator.Create(Token.Assign, MiniType.Int, MiniType.Int)
                    .WithLeft <Operator, TypeNode>(new VariableReference(declare0))
                    .WithRight <Operator, TypeNode>(
                        Operator.Create(Token.Assign, MiniType.Int, MiniType.Int)
                        .WithLeft <Operator, TypeNode>(new VariableReference(declare2))
                        .WithRight <Operator, TypeNode>(new Value(MiniType.Int, "0"))

                        )
                    )
            }
                );

            Invoke();
        }
        public void TestSameNamesDifferentScope()
        {
            var mainScope = new SubordinateScope(new EmptyScope());
            var scopes    = Helpers.GenerateScopes(mainScope, 6);
            var scope30   = new SubordinateScope(scopes[3]);
            var scope50   = new SubordinateScope(scopes[5]);
            var scope500  = new SubordinateScope(scope50);

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new VariableDeclaration("aa", mainScope, MiniType.Int),
                new VariableDeclaration("ee", mainScope, MiniType.Int),
                new VariableDeclaration("bbbb", mainScope, MiniType.Int),
                new Block
                {
                    new VariableDeclaration("aa", scopes[0], MiniType.Int),
                    new VariableDeclaration("bb", scopes[0], MiniType.Int),
                },
                new Block
                {
                    new VariableDeclaration("bb", scopes[1], MiniType.Bool),
                    new VariableDeclaration("aa", scopes[1], MiniType.Double),
                },
                new Block
                {
                    new VariableDeclaration("bbbb", scopes[2], MiniType.Int),
                },
                new Block
                {
                    new VariableDeclaration("ee", scopes[3], MiniType.Double),
                    new Block
                    {
                        new VariableDeclaration("bbbb", scope30, MiniType.Int),
                    },
                },
                new Block
                {
                    new VariableDeclaration("ee", scopes[4], MiniType.Bool),
                },
                new Block
                {
                    new VariableDeclaration("aa", scopes[5], MiniType.Int),
                    new Block
                    {
                        new VariableDeclaration("aa", scope50, MiniType.Int),
                        new Block
                        {
                            new VariableDeclaration("aa", scope500, MiniType.Int),
                            new VariableDeclaration("bb", scope500, MiniType.Bool),
                            new VariableDeclaration("ee", scope500, MiniType.Double),
                        }
                    },
                },
            }
                );

            Invoke();
        }
        public void TestOneLineProgram()
        {
            var mainScope = new SubordinateScope(new EmptyScope());

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new VariableDeclaration("a", mainScope, MiniType.Int),
            }
                );

            Invoke();
        }
        public void TestManyVariablesInManyScopes()
        {
            var mainScope = new SubordinateScope(new EmptyScope());
            var scopes    = Helpers.GenerateScopes(mainScope, 7);
            var scope20   = new SubordinateScope(scopes[2]);

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new Block
                {
                    new VariableDeclaration("a", scopes[0], MiniType.Double),
                },
                new Block
                {
                    new VariableDeclaration("amuuuuuuuuuuuused", scopes[1], MiniType.Double),
                    new VariableDeclaration("b", scopes[1], MiniType.Bool),
                    new VariableDeclaration("c", scopes[1], MiniType.Int),
                },
                new Block
                {
                    new VariableDeclaration("abracadabra", scopes[2], MiniType.Int),
                    new Block
                    {
                        new VariableDeclaration("gfgeeeaaaar", scope20, MiniType.Bool),
                        new Block(),
                    },
                },
                new Block
                {
                    new VariableDeclaration("d", scopes[3], MiniType.Double),
                    new VariableDeclaration("e", scopes[3], MiniType.Int),
                },
                new Block
                {
                    new VariableDeclaration("g", scopes[4], MiniType.Double),
                },
                new Block
                {
                    new VariableDeclaration("kaladin", scopes[5], MiniType.Int),
                },
                new Block
                {
                    new VariableDeclaration("notreallyused", scopes[6], MiniType.Bool),
                },
            }
                );

            Invoke();
        }
        public void TestOneLineProgram()
        {
            var scope   = new SubordinateScope(new EmptyScope());
            var declare = new VariableDeclaration("a", scope, MiniType.Int);

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block()
            {
                declare,
                Operator.Create(Token.Assign, MiniType.Int, MiniType.Int)
                .WithLeft <Operator, TypeNode>(new VariableReference(declare))
                .WithRight <Operator, TypeNode>(new Value(MiniType.Int, "5"))
            }
                );

            Invoke();
        }
        public void TestManyVariablesInManyLines()
        {
            var mainScope = new SubordinateScope(new EmptyScope());

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new VariableDeclaration("a", mainScope, MiniType.Double),
                new VariableDeclaration("amuuuuuuuuuuuused", mainScope, MiniType.Double),
                new VariableDeclaration("b", mainScope, MiniType.Bool),
                new VariableDeclaration("c", mainScope, MiniType.Int),
                new VariableDeclaration("abracadabra", mainScope, MiniType.Int),
                new VariableDeclaration("gfgeeeaaaar", mainScope, MiniType.Bool),
                new VariableDeclaration("d", mainScope, MiniType.Double),
                new VariableDeclaration("e", mainScope, MiniType.Int),
                new VariableDeclaration("g", mainScope, MiniType.Double),
                new VariableDeclaration("kaladin", mainScope, MiniType.Int),
                new VariableDeclaration("notreallyused", mainScope, MiniType.Bool),
            }
                );

            Invoke();
        }
        public void TestSameNamesDifferentCase()
        {
            var mainScope = new SubordinateScope(new EmptyScope());

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new VariableDeclaration("aA", mainScope, MiniType.Int),
                new VariableDeclaration("aa", mainScope, MiniType.Int),
                new VariableDeclaration("Aa", mainScope, MiniType.Bool),
                new VariableDeclaration("AA", mainScope, MiniType.Double),
                new VariableDeclaration("bbBb", mainScope, MiniType.Int),
                new VariableDeclaration("bbbB", mainScope, MiniType.Int),
                new VariableDeclaration("ee", mainScope, MiniType.Double),
                new VariableDeclaration("eE", mainScope, MiniType.Int),
                new VariableDeclaration("gA", mainScope, MiniType.Double),
                new VariableDeclaration("GA", mainScope, MiniType.Bool),
                new VariableDeclaration("Kaladin", mainScope, MiniType.Int),
                new VariableDeclaration("kaladin", mainScope, MiniType.Bool),
            }
                );

            Invoke();
        }
        public void TestManyVariablesInOneLine()
        {
            var mainScope = new SubordinateScope(new EmptyScope());

            ExpectedTree = Helpers.CreateSyntaxTree(
                new Block
            {
                new VariableDeclaration("a", mainScope, MiniType.Int),
                new VariableDeclaration("b", mainScope, MiniType.Double),
                new VariableDeclaration("c", mainScope, MiniType.Bool),
                new VariableDeclaration("d", mainScope, MiniType.Bool),
                new VariableDeclaration("e", mainScope, MiniType.Int),
                new VariableDeclaration("g", mainScope, MiniType.Double),
                new VariableDeclaration("aa", mainScope, MiniType.Double),
                new VariableDeclaration("ab", mainScope, MiniType.Int),
                new VariableDeclaration("cc", mainScope, MiniType.Int),
                new VariableDeclaration("dd", mainScope, MiniType.Double),
                new VariableDeclaration("eee", mainScope, MiniType.Bool),
                new VariableDeclaration("gag", mainScope, MiniType.Double),
            }
                );

            Invoke();
        }