summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-08-31 13:32:52 +0000
committeracolyer <acolyer>2005-08-31 13:32:52 +0000
commit53c725aef7efb4bf4012a67dc2408b0c24818a26 (patch)
treeb672e24a8012d29296ac3d6069ce1e968b2480e2 /tests
parent8fc27ca674446cec163f22412d11b5e2ee674549 (diff)
downloadaspectj-53c725aef7efb4bf4012a67dc2408b0c24818a26.tar.gz
aspectj-53c725aef7efb4bf4012a67dc2408b0c24818a26.zip
tests for pr108370, enum switch in itd method with target type on the inpath
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/pr108370/EnumTest.aj19
-rw-r--r--tests/bugs150/pr108370/et/Q.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml12
4 files changed, 36 insertions, 1 deletions
diff --git a/tests/bugs150/pr108370/EnumTest.aj b/tests/bugs150/pr108370/EnumTest.aj
new file mode 100644
index 000000000..44286f58a
--- /dev/null
+++ b/tests/bugs150/pr108370/EnumTest.aj
@@ -0,0 +1,19 @@
+public aspect EnumTest {
+ public static enum Test {
+ A,B,C
+ }
+
+ public void et.Q.foo(Test t) {
+ switch (t) {
+ case B:
+ System.out.println("B!");
+ break;
+ }
+ }
+
+ public static void main(String[] args) {
+ et.Q q = new et.Q();
+ q.foo(Test.B);
+ q.foo(Test.C);
+ }
+} \ No newline at end of file
diff --git a/tests/bugs150/pr108370/et/Q.java b/tests/bugs150/pr108370/et/Q.java
new file mode 100644
index 000000000..6c070156a
--- /dev/null
+++ b/tests/bugs150/pr108370/et/Q.java
@@ -0,0 +1,2 @@
+package et;
+public class Q {} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index afe055400..94823ac7b 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -314,6 +314,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("type variable with type variable bound");
}
+ public void testEnumSwitchInITD() {
+ runTest("switch on enum inside ITD method");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 201b95688..2519f7933 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -367,7 +367,17 @@
<compile files="pr108054.aj" options="-1.5"/>
<compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/>
</ajc-test>
-
+
+ <ajc-test dir="bugs150/pr108370" pr="108370" title="switch on enum inside ITD method">
+ <compile files="et/Q.java" options="-1.5"/>
+ <compile files="EnumTest.aj" options="-1.5 -inpath et"/>
+ <run class="EnumTest">
+ <stdout>
+ <line text="B!"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<!-- ============================================================================ -->
<!-- ============================================================================ -->