From e2fac0e58679db78ef8ce62e9e2945b5e3a5a696 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 28 Oct 2008 00:40:20 +0000 Subject: [PATCH] 252285: tests --- tests/bugs163/pr252285/Bridged.java | 31 +++++++++++++++++++ .../systemtest/ajc163/Ajc163Tests.java | 4 +++ .../org/aspectj/systemtest/ajc163/ajc163.xml | 12 +++++++ 3 files changed, 47 insertions(+) create mode 100644 tests/bugs163/pr252285/Bridged.java diff --git a/tests/bugs163/pr252285/Bridged.java b/tests/bugs163/pr252285/Bridged.java new file mode 100644 index 000000000..94633e105 --- /dev/null +++ b/tests/bugs163/pr252285/Bridged.java @@ -0,0 +1,31 @@ +import java.lang.reflect.Method; +import java.util.*; + +interface Super { +} + +aspect X { + private T Super.getterA; +} + + +public class Bridged implements Super { + + // Print BRIDGE status of all getter* methods + public static void main(String[] argv) { + Method[] ms = Bridged.class.getMethods(); + List results = new ArrayList(); + for (int i = 0; i < ms.length; i++) { + if (ms[i].getName().indexOf("getter")!=-1) { + +results.add(ms[i].getName()+"()"+ms[i].getReturnType().getName()+ " isBridged?"+((ms[i].getModifiers() & 0x0040) != 0)); + } + } + Collections.sort(results); + for (Iterator iterator = results.iterator(); iterator.hasNext();) { + String entry = (String) iterator.next(); + System.out.println(entry); + } + } +} + diff --git a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java index 756f05ddf..9fab888d1 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java @@ -30,6 +30,10 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("bridge methods for generic itds"); } + public void testGenericFieldBridging_pr252285() { + runTest("bridge methods for generic itd fields"); + } + public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc163Tests.class); } diff --git a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml index cb5d11813..519cf9fdd 100644 --- a/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml +++ b/tests/src/org/aspectj/systemtest/ajc163/ajc163.xml @@ -23,5 +23,17 @@ + + + + + + + + + + + + \ No newline at end of file -- 2.39.5