1 package test.net.sourceforge.pmd.dfa; 2 3 import net.sourceforge.pmd.PMD; 4 import net.sourceforge.pmd.ast.ASTMethodDeclarator; 5 import net.sourceforge.pmd.dfa.IDataFlowNode; 6 import net.sourceforge.pmd.dfa.pathfinder.CurrentPath; 7 import net.sourceforge.pmd.dfa.pathfinder.DAAPathFinder; 8 import net.sourceforge.pmd.dfa.pathfinder.Executable; 9 import test.net.sourceforge.pmd.testframework.ParserTst; 10 11 public class DAAPathFinderTest extends ParserTst implements Executable { 12 13 public void testTwoUpdateDefs() throws Throwable { 14 ASTMethodDeclarator meth = (ASTMethodDeclarator) getOrderedNodes(ASTMethodDeclarator.class, TWO_UPDATE_DEFS).get(0); 15 DAAPathFinder a = new DAAPathFinder((IDataFlowNode) meth.getDataFlowNode().getFlow().get(0), this); 16 } 18 19 public void execute(CurrentPath path) { 20 } 21 22 23 private static final String TWO_UPDATE_DEFS = 24 "class Foo {" + PMD.EOL + 25 " void bar(int x) {" + PMD.EOL + 26 " for (int i=0; i<10; i++, j--) {}" + PMD.EOL + 27 " }" + PMD.EOL + 28 "}"; 29 30 31 } 32 | Popular Tags |