From 53c725aef7efb4bf4012a67dc2408b0c24818a26 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 31 Aug 2005 13:32:52 +0000 Subject: tests for pr108370, enum switch in itd method with target type on the inpath --- tests/bugs150/pr108370/EnumTest.aj | 19 +++++++++++++++++++ tests/bugs150/pr108370/et/Q.java | 2 ++ .../org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 ++++ tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 12 +++++++++++- 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 tests/bugs150/pr108370/EnumTest.aj create mode 100644 tests/bugs150/pr108370/et/Q.java (limited to 'tests') 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 @@ - + + + + + + + + + + + -- cgit v1.2.3