diff options
author | aclement <aclement> | 2008-12-09 19:21:17 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-12-09 19:21:17 +0000 |
commit | f1a83b5f2ba583e3c18542f962b569847a863844 (patch) | |
tree | e2cf08311fc4799359053a8c2af4026bfb9b5de3 /tests | |
parent | 364e330f369eb4002c1596b6b425053bc92d3310 (diff) | |
download | aspectj-f1a83b5f2ba583e3c18542f962b569847a863844.tar.gz aspectj-f1a83b5f2ba583e3c18542f962b569847a863844.zip |
251326: testcase
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs163/pr251326/pkgA/Listener.java | 7 | ||||
-rw-r--r-- | tests/bugs163/pr251326/pkgA/Target.java | 19 | ||||
-rw-r--r-- | tests/bugs163/pr251326/pkgB/InferListener.aj | 16 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java | 3 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc163/ajc163.xml | 10 |
5 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs163/pr251326/pkgA/Listener.java b/tests/bugs163/pr251326/pkgA/Listener.java new file mode 100644 index 000000000..d3a6f68ea --- /dev/null +++ b/tests/bugs163/pr251326/pkgA/Listener.java @@ -0,0 +1,7 @@ +package pkgA; + +public interface Listener { + + public void happened(String event); + +} diff --git a/tests/bugs163/pr251326/pkgA/Target.java b/tests/bugs163/pr251326/pkgA/Target.java new file mode 100644 index 000000000..00e1a5f5a --- /dev/null +++ b/tests/bugs163/pr251326/pkgA/Target.java @@ -0,0 +1,19 @@ +package pkgA; + +public class Target { + + public Listener listenA() { + return new Listener() { + public void happened(String event) { + System.out.println(event); + } + }; + } + + public static void main(String[] args) { + Target t = new Target(); + t.listenA().happened("Simple A"); + t.listenB().happened("Inferred B"); + } + +} diff --git a/tests/bugs163/pr251326/pkgB/InferListener.aj b/tests/bugs163/pr251326/pkgB/InferListener.aj new file mode 100644 index 000000000..7dfa14132 --- /dev/null +++ b/tests/bugs163/pr251326/pkgB/InferListener.aj @@ -0,0 +1,16 @@ +package pkgB; + +import pkgA.Listener; +import pkgA.Target; + +public aspect InferListener { + + public Listener Target.listenB() { + return new Listener() { + public void happened(String event) { + System.out.println(event); + } + }; + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index 66f7a14c4..82bc47c82 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -27,6 +27,9 @@ import org.aspectj.testing.Utils; import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { +// public void testGenericMethodBridging_pr251326() { +// runTest("itd anonymous inner class in wrong package"); +// } public void testAtTargetPlus_pr255856() { runTest("attarget with plus"); diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml index e3fcb32b2..bdeaeeb01 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml +++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml @@ -318,4 +318,14 @@ </run> </ajc-test> + <ajc-test dir="bugs163/pr251326" title="itd anonymous inner class in wrong package"> + <compile files="pkgA/Listener.java pkgA/Target.java pkgB/InferListener.aj" options="-1.5"/> + <run class="pkgA.Target"> + <stdout> + <line text="Simple A"/> + <line text="Inferred B"/> + </stdout> + </run> + </ajc-test> + </suite>
\ No newline at end of file |