aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs170/pr376139/Code.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc170/ajc170.xml5
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs170/pr376139/Code.java b/tests/bugs170/pr376139/Code.java
new file mode 100644
index 000000000..b3c97378e
--- /dev/null
+++ b/tests/bugs170/pr376139/Code.java
@@ -0,0 +1,10 @@
+enum Color { R,G,B; }
+
+public class Code {
+
+ public static void main(String[] argv) {
+ Color c = Color.R;
+ switch (c) {
+ }
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
index c78bd02bd..643340944 100644
--- a/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
@@ -31,6 +31,9 @@ import org.aspectj.weaver.tools.StandardPointcutParser;
*/
public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testSwitchOnEnum() {
+ runTest("switch on enum");
+ }
public void testDecAtFieldOrderingLTW1() {
runTest("dec at field ordering ltw 1");
diff --git a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
index 953edf874..5bf94415c 100644
--- a/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
+++ b/tests/src/org/aspectj/systemtest/ajc170/ajc170.xml
@@ -3,6 +3,11 @@
<suite>
+ <ajc-test dir="bugs170/pr376139" title="switch on enum">
+ <compile files="Code.java" options="-1.5"/>
+ <run class="Code"/>
+ </ajc-test>
+
<ajc-test dir="bugs170/ltw" title="dec at field ordering 1">
<compile files="Anno.java TriggerAll.java MyObject.java Main.java" options="-1.5"/>
<run class="ch.tests.Main">