Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.MethodDeclaration


    methods = CFGTestUtils.createMethodNameMap(compUnit);
  }

  @Test
  public void simpleTest() throws Exception {
    MethodDeclaration decl = methods.get("simple");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here


    }
  }

  @Test
  public void breakingTest() throws Exception {
    MethodDeclaration decl = methods.get("breaking");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void continuingTest() throws Exception {
    MethodDeclaration decl = methods.get("continuing");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void emptyCondTest() throws Exception {
    MethodDeclaration decl = methods.get("emptyCond");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void emptyInitsTest() throws Exception {
    MethodDeclaration decl = methods.get("emptyInits");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void emptyUpdatesTest() throws Exception {
    MethodDeclaration decl = methods.get("emptyUpdates");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void blankTest() throws Exception {
    MethodDeclaration decl = methods.get("blank");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

    }
  }

  @Test
  public void infiniteTest() throws Exception {
    MethodDeclaration decl = methods.get("infinite");
    Assert.assertTrue(CFGTestUtils.testAndCompareCFG(decl));
  }
View Full Code Here

public class EclipseTACTargetSelectionTest {

  @Test
  public void testFactorial() throws Exception {
    CompilationUnit simple = EclipseTACSimpleTestDriver.parseCode("Factorial", FACTORIAL);
    MethodDeclaration m = EclipseTACSimpleTestDriver.getFirstMethod(simple);
    EclipseTAC tac = new EclipseTAC(m.resolveBinding());
   
    ConditionalExpression cond = (ConditionalExpression) EclipseTACSimpleTestDriver.getLastStatementReturn(m).getExpression();
    Variable r = tac.variable(cond);
    TACInstruction instr;
View Full Code Here

    "}";
 
  @Test
  public void testInitializers() throws Exception {
    CompilationUnit simple = EclipseTACSimpleTestDriver.parseCode("Initializers", INITIALIZERS);
    MethodDeclaration m = EclipseTACSimpleTestDriver.getFirstMethod(simple);
    EclipseTAC tac = new EclipseTAC(m.resolveBinding());
   
    List<Statement> stmts = m.getBody().statements();
    Assert.assertTrue(stmts.size() == 5);
   
    TACInstruction decl, init;
    for(int i = 0; i < 4; i++) {
      VariableDeclarationStatement s = (VariableDeclarationStatement) stmts.get(i);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.MethodDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.