aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2011-04-26 16:10:56 +0000
committeraclement <aclement>2011-04-26 16:10:56 +0000
commit813c038cb5bb67faa82bd34bde9493766968c25b (patch)
tree02208158ff98fb3bee2b76bb23719cfac2b5510f /tests
parent2b0e478845697017de62ef8e430ca30837407c47 (diff)
downloadaspectj-813c038cb5bb67faa82bd34bde9493766968c25b.tar.gz
aspectj-813c038cb5bb67faa82bd34bde9493766968c25b.zip
343001: testcode and fix: when faulting in binary aspects, fill in decp parents
Diffstat (limited to 'tests')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 55a8213a7..5408f7ae2 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -260,6 +260,31 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
assertEquals("{Code=[I]}", thisAspectNode.getDeclareParentsMap().toString());
}
+ public void testBinaryAspectsAndTheModel_343001() throws Exception {
+ String lib = "pr343001_lib";
+ initialiseProject(lib);
+ build(lib);
+
+ // Check the 'standard build' - the library also has a type affected by the decp so we can check what happens on an 'all source' build
+ IProgramElement theAspect = getModelFor(lib).getHierarchy().findElementForHandleOrCreate("=pr343001_lib<{Super.java'Super",false);
+ assertNotNull(theAspect);
+ IProgramElement sourcelevelDecp = getModelFor(lib).getHierarchy().findElementForHandleOrCreate("=pr343001_lib<{Super.java'Super`declare parents",false);
+ assertNotNull(sourcelevelDecp);
+ assertEquals("[java.io.Serializable]",sourcelevelDecp.getParentTypes().toString());
+
+ String p = "pr343001";
+ initialiseProject(p);
+ configureAspectPath(p, getProjectRelativePath(lib, "bin"));
+ build(p);
+
+ IProgramElement theBinaryAspect = getModelFor(p).getHierarchy().findElementForHandleOrCreate("=pr343001/binaries<(Super.class'Super",false);
+ assertNotNull(theBinaryAspect);
+ IProgramElement binaryDecp = getModelFor(p).getHierarchy().findElementForHandleOrCreate("=pr343001/binaries<(Super.class'Super`declare parents",false);
+ assertNotNull(binaryDecp);
+ assertEquals("[java.io.Serializable]",(binaryDecp.getParentTypes()==null?"":binaryDecp.getParentTypes().toString()));
+ }
+
+
// found whilst looking at 322446 hence that is the testdata name
public void testAspectInheritance_322664() throws Exception {
AjdeInteractionTestbed.VERBOSE = true;