}
@Test
public void testSimpleExpression() {
this.parser = new ExpressionParser(new ExpressionLexer("1+3"), codeGenerator);
this.parser.parse();
assertEquals("1 3 +", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("1+3-2"), codeGenerator);
this.parser.parse();
assertEquals("1 3 + 2 -", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("1+3-2/5"), codeGenerator);
this.parser.parse();
assertEquals("1 3 + 2 5 / -", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("6==3"), codeGenerator);
this.parser.parse();
assertEquals("6 3 ==", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("6>=3 && c==d.a"), codeGenerator);
this.parser.parse();
assertEquals("6 3 >= c d.a == &&", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("6>=3 && c==d.a || 0.3<4"), codeGenerator);
this.parser.parse();
assertEquals("6 3 >= c d.a == && 0.3 4 < ||", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("!true"), codeGenerator);
this.parser.parse();
assertEquals("true !", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("!a && 3==1"), codeGenerator);
this.parser.parse();
assertEquals("a ! 3 1 == &&", this.codeGenerator.getPostFixExpression());
resetCodeGenerator();
this.parser = new ExpressionParser(new ExpressionLexer("-a+2010"), codeGenerator);
this.parser.parse();
assertEquals("a - 2010 +", this.codeGenerator.getPostFixExpression());
}