ForStmt extends LoopStmt { public Stmt getInit() { return init; } ForStmt(Stmt init, Expr condition, Expr increment, Stmt body); @Override boolean hasCondition(); boolean hasIncrement(); Stmt getInit(); Expr getIncrement(); @Override void accept(IAstVisitor visitor); @Override ForStmt clone(); @Override void replaceChild(IAstNode child, IAstNode newChild); @Override boolean hasChild(IAstNode candidateChild);  }
@Test public void testInitIsNullStmt() throws Exception { final TranslationUnit tu = ParseHelper.parse("void main() { for( ; 1; 1) { } }"); final ForStmt stmt = (ForStmt) ((FunctionDefinition) tu.getTopLevelDeclarations().get(0)).getBody() .getStmt(0); assertTrue(stmt.getInit() instanceof NullStmt); }