use of net.sourceforge.pmd.lang.java.ast.ASTExpression in project pmd by pmd.
the class StatementAndBraceFinderTest method testForStmtHasCorrectTypes.
@Test
public void testForStmtHasCorrectTypes() {
ASTExpression exp = getOrderedNodes(ASTExpression.class, TEST5).get(0);
DataFlowNode dfn = exp.getDataFlowNode().getFlow().get(2);
assertTrue(dfn.isType(NodeType.FOR_INIT));
dfn = exp.getDataFlowNode().getFlow().get(3);
assertTrue(dfn.isType(NodeType.FOR_EXPR));
dfn = exp.getDataFlowNode().getFlow().get(4);
assertTrue(dfn.isType(NodeType.FOR_UPDATE));
assertTrue(dfn.isType(NodeType.FOR_BEFORE_FIRST_STATEMENT));
assertTrue(dfn.isType(NodeType.FOR_END));
}
Aggregations