initialiseProject("coverage");
compilerConfig = (TestCompilerConfiguration) getCompiler().getCompilerConfiguration();
compilerConfig.setProjectSourceFiles(getSourceFileList(files));
+ compilerConfig.setNonStandardOptions("-Xset:minimalModel=false");
doBuild();
manager = AsmManager.lastActiveStructureModel;
model = AsmManager.lastActiveStructureModel.getHierarchy();
IProgramElement packageAspect = model.findElementForType(null, "AdviceNamingCoverage");
assertNotNull(packageAspect);
assertEquals(IProgramElement.Accessibility.PACKAGE, packageAspect.getAccessibility());
- assertEquals("aspect should not have public in it's signature", "aspect AdviceNamingCoverage", packageAspect
- .getSourceSignature());
+ assertEquals("aspect should not have public in it's signature", "aspect AdviceNamingCoverage",
+ packageAspect.getSourceSignature());
}
public void testStaticModifiers() {
initialiseProject("figures-coverage");
compilerConfig = (TestCompilerConfiguration) getCompiler().getCompilerConfiguration();
compilerConfig.setProjectSourceFiles(getSourceFileList(files));
+ compilerConfig.setNonStandardOptions("-Xset:minimalModel=false");
doBuild();
manager = AsmManager.lastActiveStructureModel;
}
IProgramElement node = manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath());
assertTrue("find result", node != null);
IProgramElement pNode = (IProgramElement) (node).getChildren().get(3);
- assertEquals(IProgramElement.Kind.ASPECT,pNode.getKind());
+ assertEquals(IProgramElement.Kind.ASPECT, pNode.getKind());
IProgramElement pointcut = (IProgramElement) pNode.getChildren().get(0);
assertTrue("kind", pointcut.getKind().equals(IProgramElement.Kind.POINTCUT));
assertTrue("found node: " + pointcut.getName(), pointcut.toLabelString().equals("testptct()"));
}
private void testModelIntegrityHelper(IProgramElement node) throws Exception {
- for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
+ for (Iterator<IProgramElement> it = node.getChildren().iterator(); it.hasNext();) {
IProgramElement child = (IProgramElement) it.next();
if (node == child.getParent()) {
testModelIntegrityHelper(child);
public void preProcess(IProgramElement node) {
if (node.getChildren() == null)
return;
- for (Iterator it = node.getChildren().iterator(); it.hasNext();) {
+ for (Iterator<IProgramElement> it = node.getChildren().iterator(); it.hasNext();) {
if (it.next() == null)
throw new NullPointerException("null child on node: " + node.getName());
}