Boo.Lang.Parser.Tests.BooParserTestCase.TestWhileStmt1 C# (CSharp) Method

TestWhileStmt1() private method

private TestWhileStmt1 ( ) : void
return void
        public void TestWhileStmt1()
        {
            Boo.Lang.Compiler.Ast.Module module = ParseTestCase("while_stmt_1.boo");

            WhileStatement ws = (WhileStatement)module.Globals.Statements[3];
            Assert.AreEqual(true, ((BoolLiteralExpression)ws.Condition).Value);
            Assert.AreEqual(4, ws.Block.Statements.Count);

            BreakStatement bs = (BreakStatement)ws.Block.Statements[3];
            BinaryExpression condition = (BinaryExpression)bs.Modifier.Condition;
            Assert.AreEqual(BinaryOperatorType.Equality, condition.Operator);
        }