}
public void testIfElseAndLoopStatements() throws Exception {
TranslationUnit unit = parse("void foo() { if (true) { for(;;); } else { while(true); } }");
FunctionDefinition functionFoo = unit.getChild(0);
IfStatement ifStatement = functionFoo.getChild(0);
LoopStatement forStatement = ifStatement.getChild(0);
assertNotNull(forStatement);
ElseStatement elseStatement = functionFoo.getChild(1);
LoopStatement whileStatement = elseStatement.getChild(0);
assertNotNull(whileStatement);
}