diff options
author | Andy Clement <aclement@pivotal.io> | 2016-02-18 12:08:06 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2016-02-18 12:08:06 -0800 |
commit | f4c8433cb046e343b8491d04f0a10bd150924507 (patch) | |
tree | aa31290831862215cea09543c92b6d2a9fc67ab7 /tests | |
parent | a17b28a1a9a0756cfc2181bf2b095650e186425a (diff) | |
download | aspectj-f4c8433cb046e343b8491d04f0a10bd150924507.tar.gz aspectj-f4c8433cb046e343b8491d04f0a10bd150924507.zip |
Fix 433351: Declare parents fails on interfaces on the inpath depending on directory structure
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs189/433351/ClassProj1.java | 8 | ||||
-rw-r--r-- | tests/bugs189/433351/ClassProj2.java | 9 | ||||
-rw-r--r-- | tests/bugs189/433351/Extender.aj (renamed from tests/bugs181/433351/Extender.aj) | 0 | ||||
-rw-r--r-- | tests/bugs189/433351/Extender2.aj | 10 | ||||
-rw-r--r-- | tests/bugs189/433351/Extender3.aj | 10 | ||||
-rw-r--r-- | tests/bugs189/433351/InterfaceProj1.java (renamed from tests/bugs181/433351/InterfaceProj1.java) | 0 | ||||
-rw-r--r-- | tests/bugs189/433351/InterfaceProj2.java (renamed from tests/bugs181/433351/InterfaceProj2.java) | 0 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc181/ajc181.xml | 7 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java | 16 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc189/ajc189.xml | 29 |
12 files changed, 82 insertions, 12 deletions
diff --git a/tests/bugs189/433351/ClassProj1.java b/tests/bugs189/433351/ClassProj1.java new file mode 100644 index 000000000..ce06e88ab --- /dev/null +++ b/tests/bugs189/433351/ClassProj1.java @@ -0,0 +1,8 @@ +package test; + +public abstract class ClassProj1<T> implements InterfaceProj1<String> { + + public int aMethod() { + return 1; + } +} diff --git a/tests/bugs189/433351/ClassProj2.java b/tests/bugs189/433351/ClassProj2.java new file mode 100644 index 000000000..2aca8b08e --- /dev/null +++ b/tests/bugs189/433351/ClassProj2.java @@ -0,0 +1,9 @@ +package test.extender; + +public abstract class ClassProj2<T> implements InterfaceProj2<T> { + + public int bMethod() { + return 2; + } + +} diff --git a/tests/bugs181/433351/Extender.aj b/tests/bugs189/433351/Extender.aj index 433275660..433275660 100644 --- a/tests/bugs181/433351/Extender.aj +++ b/tests/bugs189/433351/Extender.aj diff --git a/tests/bugs189/433351/Extender2.aj b/tests/bugs189/433351/Extender2.aj new file mode 100644 index 000000000..351c70eeb --- /dev/null +++ b/tests/bugs189/433351/Extender2.aj @@ -0,0 +1,10 @@ +package test.extender; +import test.*; + +public aspect Extender2 { + + declare parents: InterfaceProj1 extends java.io.Serializable; + +// declare parents: test.ClassProj1 extends ClassProj2; + +} diff --git a/tests/bugs189/433351/Extender3.aj b/tests/bugs189/433351/Extender3.aj new file mode 100644 index 000000000..9fcda9e52 --- /dev/null +++ b/tests/bugs189/433351/Extender3.aj @@ -0,0 +1,10 @@ +package test.extender; +import test.*; + +public aspect Extender3 { + + declare parents: InterfaceProj1 extends InterfaceProj2; + + declare parents: test.ClassProj1 extends ClassProj2; + +} diff --git a/tests/bugs181/433351/InterfaceProj1.java b/tests/bugs189/433351/InterfaceProj1.java index 7d90bef54..7d90bef54 100644 --- a/tests/bugs181/433351/InterfaceProj1.java +++ b/tests/bugs189/433351/InterfaceProj1.java diff --git a/tests/bugs181/433351/InterfaceProj2.java b/tests/bugs189/433351/InterfaceProj2.java index b6846f54c..b6846f54c 100644 --- a/tests/bugs181/433351/InterfaceProj2.java +++ b/tests/bugs189/433351/InterfaceProj2.java diff --git a/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java b/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java index a15231dcf..3aa41837e 100644 --- a/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java @@ -21,10 +21,6 @@ import org.aspectj.testing.XMLBasedAjcTestCase; * @author Andy Clement */ public class Ajc181Tests extends org.aspectj.testing.XMLBasedAjcTestCase { - - public void testJarWeaving_433351() { - runTest("jar weaving"); - } public void testParameterNamesAttribute_436531() { runTest("parameter names attribute"); diff --git a/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml b/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml index 314aaf712..1a8b1acfc 100644 --- a/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml +++ b/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml @@ -2,13 +2,6 @@ <suite> - <ajc-test dir="bugs181/433351" title="jar weaving"> - <compile options="-1.5" files="InterfaceProj1.java" outjar="code.jar"/> - <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender.aj InterfaceProj2.java"> - <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'test.extender.InterfaceProj2' (Extender.aj)"/> - </compile> - </ajc-test> - <ajc-test dir="bugs181/436531" title="parameter names attribute"> <compile options="-1.8" files="Azpect.java" inpath="code.jar"/> </ajc-test> diff --git a/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java b/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java index a3a191a61..456c4a41f 100644 --- a/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc189/Ajc189Tests.java @@ -22,6 +22,22 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc189Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testJarWeaving_433351() { + runTest("jar weaving"); + } + + public void testJarWeaving_433351_4() { + runTest("jar weaving 4"); + } + + public void testJarWeaving_433351_3() { + runTest("jar weaving 3"); + } + + public void testJarWeaving_433351_2() { + runTest("jar weaving 2"); + } + public void testNPEAtAspectJ() throws Exception { runTest("NPE at aspectj"); } diff --git a/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java b/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java index 0ccf75cf2..546ef02de 100644 --- a/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java +++ b/tests/src/org/aspectj/systemtest/ajc189/AllTestsAspectJ189.java @@ -12,7 +12,6 @@ package org.aspectj.systemtest.ajc189; import junit.framework.Test; import junit.framework.TestSuite; -import org.aspectj.systemtest.apt.AptTests; public class AllTestsAspectJ189 { diff --git a/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml b/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml index 586ff771e..8693c1e24 100644 --- a/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml +++ b/tests/src/org/aspectj/systemtest/ajc189/ajc189.xml @@ -2,6 +2,35 @@ <suite> + <ajc-test dir="bugs189/433351" title="jar weaving"> + <compile options="-1.5" files="InterfaceProj1.java" outjar="code.jar"/> + <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender.aj InterfaceProj2.java"> + <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'test.extender.InterfaceProj2' (Extender.aj)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs189/433351" title="jar weaving 2"> + <compile options="-1.5" files="InterfaceProj1.java ClassProj1.java" outjar="code.jar"/> + <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender2.aj" outjar="code2.jar"> + <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'java.io.Serializable' (Extender2.aj)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs189/433351" title="jar weaving 3"> + <compile options="-1.5" files="InterfaceProj1.java ClassProj1.java" outjar="code.jar"/> + <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender3.aj InterfaceProj2.java ClassProj2.java" outjar="code2.jar"> + <message kind="weave" text="Setting superclass of type 'test.ClassProj1' (ClassProj1.java) to 'test.extender.ClassProj2' (Extender3.aj)"/> + <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'test.extender.InterfaceProj2' (Extender3.aj)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs189/433351" title="jar weaving 4"> + <compile options="-1.5" files="ClassProj1.java InterfaceProj1.java" outjar="code.jar"/> + <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender2.aj" outjar="code2.jar"> + <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'java.io.Serializable' (Extender2.aj)"/> + </compile> + </ajc-test> + <ajc-test dir="bugs189/485583" title="NPE at aspectj"> <compile files="Foo.aj Bar.aj" options="-1.8"> <message kind="error" text="The abstract pointcut deprecatedCode can only be defined in an aspect"/> |