public void testLinenoFor() { AstRoot root = parse("\nfor(\n" + ";\n" + ";\n" + ") {\n" + "}\n"); ForLoop forLoop = (ForLoop) root.getFirstChild(); AstNode initClause = forLoop.getInitializer(); AstNode condClause = forLoop.getCondition(); AstNode incrClause = forLoop.getIncrement(); assertEquals(1, forLoop.getLineno()); assertEquals(2, initClause.getLineno()); assertEquals(3, condClause.getLineno()); assertEquals(4, incrClause.getLineno()); }