diff options
author | aclement <aclement> | 2004-02-09 15:07:37 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-02-09 15:07:37 +0000 |
commit | 775d1175b7da80535cc48d22cb424239d76594bf (patch) | |
tree | 85ffa3bc3b3d9a88240e81a889285ed25801414e /tests | |
parent | 481165a816d3209bed1b07b996a3b8f043140fd4 (diff) | |
download | aspectj-775d1175b7da80535cc48d22cb424239d76594bf.tar.gz aspectj-775d1175b7da80535cc48d22cb424239d76594bf.zip |
Fix for Bugzilla Bug 50641
Better binary compatibility for advice method names
- I've run the tests a thousand times and they all pass, I'm still nervous about this first big commit though *gulp*
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 25 | ||||
-rw-r--r-- | tests/ajcTestsFailing.xml | 16 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/Main.java | 2 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceV2.aj | 2 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceWithInnerV1.aj | 24 | ||||
-rw-r--r-- | tests/bugs/binaryCompat/TraceWithInnerV2.aj | 34 |
6 files changed, 86 insertions, 17 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 57b496aaa..4f68d8e00 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -7142,9 +7142,34 @@ <run class="HandlerSig"/> </ajc-test> + <ajc-test dir="new" pr="42668" title="after returning with parameter: matching rules"> <compile files="AfterReturningParamMatching.java" /> <run class="AfterReturningParamMatching"/> </ajc-test> + + <ajc-test dir="bugs/binaryCompat" pr="50641" + title="binary compatibility of advice method names - expect no error"> + <compile files="Main.java,TraceV1.aj"/> + <run class="Main"/> + <compile files="TraceV2.aj"/> + <run class="Main"/> + </ajc-test> + + <ajc-test dir="bugs/binaryCompat" pr="50641" + title="binary compatibility of advice method names - expect error"> + <compile files="Main.java,TraceV1.aj"/> + <run class="Main"/> + <compile files="TraceRE.aj"/> + <run class="Main"/> + </ajc-test> + + <ajc-test dir="bugs/binaryCompat" pr="50641" + title="binary compatibility of advice method names - expect no error"> + <compile files="Main.java,TraceWithInnerV1.aj"/> + <run class="Main"/> + <compile files="TraceWithInnerV2.aj"/> + <run class="Main"/> + </ajc-test> </suite> diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index cea32f4dd..c2fb46b05 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -127,22 +127,6 @@ <run class="InterfaceMethodDeclarationNonPublic"/> </ajc-test> - <ajc-test dir="bugs/binaryCompat" pr="50641" - title="binary compatibility of advice method names - expect no error"> - <compile files="Main.java,TraceV1.aj"/> - <run class="Main"/> - <compile files="TraceV2.aj"/> - <run class="Main"/> - </ajc-test> - - <ajc-test dir="bugs/binaryCompat" pr="50641" - title="binary compatibility of advice method names - expect error"> - <compile files="Main.java,TraceV1.aj"/> - <run class="Main"/> - <compile files="TraceRE.aj"/> - <run class="Main"/> - </ajc-test> - <ajc-test dir="bugs" pr="36787" title="interface initialization order"> <compile files="InterfaceInitializerOrder.java"/> diff --git a/tests/bugs/binaryCompat/Main.java b/tests/bugs/binaryCompat/Main.java index d91978f9f..0903463d9 100644 --- a/tests/bugs/binaryCompat/Main.java +++ b/tests/bugs/binaryCompat/Main.java @@ -14,4 +14,4 @@ public class Main { private static void doit() { System.out.println("hello world"); } -}
\ No newline at end of file +} diff --git a/tests/bugs/binaryCompat/TraceV2.aj b/tests/bugs/binaryCompat/TraceV2.aj index c71416af3..5764387b0 100644 --- a/tests/bugs/binaryCompat/TraceV2.aj +++ b/tests/bugs/binaryCompat/TraceV2.aj @@ -3,8 +3,10 @@ aspect Trace { before(): execution(void doit(..)) {
System.out.println("entering");
+
}
+
after() returning: execution(void doit(..)) {
System.out.println("exiting");
}
diff --git a/tests/bugs/binaryCompat/TraceWithInnerV1.aj b/tests/bugs/binaryCompat/TraceWithInnerV1.aj new file mode 100644 index 000000000..2238a2323 --- /dev/null +++ b/tests/bugs/binaryCompat/TraceWithInnerV1.aj @@ -0,0 +1,24 @@ +aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("enter");
+ }
+
+ static aspect InnerTrace {
+ before(): execution(void doit(..)) {
+ System.out.println("Inner enter");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("Inner exit");
+ }
+
+ after() throwing: execution(void doit(..)) {
+ System.out.println("Inner after throwing");
+ }
+ }
+ after() returning: execution(void doit(..)) {
+ System.out.println("exit");
+ }
+}
\ No newline at end of file diff --git a/tests/bugs/binaryCompat/TraceWithInnerV2.aj b/tests/bugs/binaryCompat/TraceWithInnerV2.aj new file mode 100644 index 000000000..297fdfba7 --- /dev/null +++ b/tests/bugs/binaryCompat/TraceWithInnerV2.aj @@ -0,0 +1,34 @@ +aspect Trace {
+ public static boolean expectNoSuchMethodError = false;
+
+ before(): execution(void doit(..)) {
+ System.out.println("entering");
+
+ }
+
+ public void method() {
+ // Extra method to do nothing but test if the numbering still behaves
+ }
+
+ static aspect InnerTrace {
+ before(): execution(void doit(..)) {
+ System.out.println("Inner entering");
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("Inner exiting");
+ }
+
+ after() throwing: execution(void doit(..)) {
+ System.out.println("Inner chucking");
+ }
+
+ before(): execution(* noMatch(..)) {
+ System.out.println("This doesn't match anything, but checks the sequence number for the next bit of advice is OK");
+ }
+ }
+
+ after() returning: execution(void doit(..)) {
+ System.out.println("exiting");
+ }
+}
\ No newline at end of file |