diff options
-rw-r--r-- | tests/bugs162/IntoBinary/Asp.java | 3 | ||||
-rw-r--r-- | tests/bugs162/IntoBinary/Clazz.java | 3 | ||||
-rw-r--r-- | tests/bugs162/IntoBinary/binaryaspect.jar | bin | 0 -> 1127 bytes | |||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java | 33 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc162/ajc162.xml | 4 |
5 files changed, 43 insertions, 0 deletions
diff --git a/tests/bugs162/IntoBinary/Asp.java b/tests/bugs162/IntoBinary/Asp.java new file mode 100644 index 000000000..8614a5175 --- /dev/null +++ b/tests/bugs162/IntoBinary/Asp.java @@ -0,0 +1,3 @@ +public aspect Asp { + before(): execution(* foo(..)) {} +} diff --git a/tests/bugs162/IntoBinary/Clazz.java b/tests/bugs162/IntoBinary/Clazz.java new file mode 100644 index 000000000..4de725d92 --- /dev/null +++ b/tests/bugs162/IntoBinary/Clazz.java @@ -0,0 +1,3 @@ +public class Clazz { + public void foo() {} +} diff --git a/tests/bugs162/IntoBinary/binaryaspect.jar b/tests/bugs162/IntoBinary/binaryaspect.jar Binary files differnew file mode 100644 index 000000000..6580ec8c8 --- /dev/null +++ b/tests/bugs162/IntoBinary/binaryaspect.jar diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java index 0085ffe99..268e2224f 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java @@ -11,14 +11,47 @@ package org.aspectj.systemtest.ajc162; import java.io.File; +import java.io.PrintWriter; import junit.framework.Test; +import org.aspectj.asm.AsmManager; import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.2 + + // When faulting in the binary hierarchy: + // <root> [java source file] + // Clazz.java [java source file] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::0 + // import declarations [import reference] + // Clazz [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:1::13 + // foo() [method] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\Clazz.java:2::36 + // Asp.class (binary) [class] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0 + // import declarations [import reference] + // Asp [aspect] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:1::0 + // before(): <anonymous pointcut> [advice] C:\temp\ajcSandbox\aspectj16_2\ajcTest3344.tmp\binaryaspect.jar!Asp.class:2::0 + // Hid:1:(targets=1) [Asp.class (binary)}Asp&before (advises) {Clazz.java[Clazz~foo + // Hid:2:(targets=1) {Clazz.java[Clazz~foo (advised by) [Asp.class (binary)}Asp&before + + // without faulting in the model they stop at the top level (the class level) + + // Hid:1:(targets=1) "{Clazz.java[Clazz~foo" (advised by) "{Asp.class" + // Hid:2:(targets=1) "{Asp.class" (advises) "{Clazz.java[Clazz~foo" + + // what I want for the hid is: + + // <somethingIndicatingBinary>"[Asp.class}Asp&before" +/* + public void testBinaryAspectModeling() throws Exception { + runTest("binary aspects model"); + AsmManager.dumptree(AsmManager.getDefault().getHierarchy().getRoot(), 0); + PrintWriter pw = new PrintWriter(System.out); + AsmManager.getDefault().dumprels(pw); + pw.flush(); + } +*/ public void testPerClause() { runTest("ltw perclause"); } diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml index f096322b2..c1054ee34 100644 --- a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml +++ b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml @@ -3,6 +3,10 @@ <!-- AspectJ v1.6.2 Tests --> <suite> + <ajc-test dir="bugs162/IntoBinary" title="binary aspects model"> + <compile options="-1.5 -emacssym" files="Clazz.java" aspectpath="binaryaspect.jar"/> + </ajc-test> + <ajc-test dir="bugs162/pr246918" title="ltw perclause"> <compile options="-1.5" files="Code.java Dode.java" outjar="code.jar"/> <compile options="-1.5 -Xlint:ignore" files="Base.java" outjar="aspects.jar"/> |