diff options
author | aclement <aclement> | 2006-04-19 11:45:46 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-04-19 11:45:46 +0000 |
commit | 980483b367011c75ed7e90b2ddb5a06b34199731 (patch) | |
tree | dd3d293b967c1c71ea61f64d551b5e01f27c61d7 | |
parent | d1a252e911bd19747b0cd6815291f62706f202d6 (diff) | |
download | aspectj-980483b367011c75ed7e90b2ddb5a06b34199731.tar.gz aspectj-980483b367011c75ed7e90b2ddb5a06b34199731.zip |
test for 137479
-rw-r--r-- | tests/bugs152/binaryDecp/SubClassLoader.java | 27 | ||||
-rw-r--r-- | tests/bugs152/binaryDecp/SubSubClassLoader.java | 12 | ||||
-rw-r--r-- | tests/bugs152/binaryDecp/X.aj | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc152/ajc152.xml | 14 |
5 files changed, 59 insertions, 0 deletions
diff --git a/tests/bugs152/binaryDecp/SubClassLoader.java b/tests/bugs152/binaryDecp/SubClassLoader.java new file mode 100644 index 000000000..f5ba9a4b3 --- /dev/null +++ b/tests/bugs152/binaryDecp/SubClassLoader.java @@ -0,0 +1,27 @@ +// Bug reported that we incorrectly consider static methods when looking at +// binary weaving decp rules - we shouldn't consider them overriding + +import java.util.*; + +public class SubClassLoader { + private static List l; + + class Inner { + public void foo() { + System.err.println(l.toString()); + } + } + + +/* + // this one would override java.lang.ClassLoader.access$000 on an IBM VM + public static List access$000(ClassLoader cl,String s,byte[] bs,int i,int j,Object o) { + return null; + } + + // this one would override java.lang.ClassLoader.access$000 on an SUN VM:w + public static List access$000() { + return null; + } +*/ +} diff --git a/tests/bugs152/binaryDecp/SubSubClassLoader.java b/tests/bugs152/binaryDecp/SubSubClassLoader.java new file mode 100644 index 000000000..4b6b7f662 --- /dev/null +++ b/tests/bugs152/binaryDecp/SubSubClassLoader.java @@ -0,0 +1,12 @@ +import java.util.*; + +public class SubSubClassLoader { + private static String l; + + class Inner2 { + public void foo() { + System.err.println(l.toString()); + } + } + +} diff --git a/tests/bugs152/binaryDecp/X.aj b/tests/bugs152/binaryDecp/X.aj new file mode 100644 index 000000000..837c825d0 --- /dev/null +++ b/tests/bugs152/binaryDecp/X.aj @@ -0,0 +1,4 @@ +public aspect X { + declare parents: SubSubClassLoader extends SubClassLoader; +// declare parents: SubClassLoader extends ClassLoader; +} diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index 06c11766c..bff94e8cd 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -19,6 +19,8 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testAspectLibrariesAndASM_pr135001() { runTest("aspect libraries and asm");} public void testStackOverflow_pr136258() { runTest("stack overflow");} + public void testIncorrectOverridesEvaluation13() { runTest("incorrect overrides evaluation - 1.3"); } + public void testIncorrectOverridesEvaluation15() { runTest("incorrect overrides evaluation - 1.5"); } ///////////////////////////////////////// public static Test suite() { diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index f020e6dc6..7ee33b766 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -20,4 +20,18 @@ <run class="StatisticsTypeImpl"/> </ajc-test> + <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.3"> + <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.3" outjar="lib.jar"/> + <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo"> + <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.5"> + <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.5" outjar="lib.jar"/> + <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo"> + <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/> + </compile> + </ajc-test> + </suite>
\ No newline at end of file |