aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs195
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2019-09-11 08:35:17 -0700
committerAndy Clement <aclement@pivotal.io>2019-09-11 08:35:17 -0700
commitaa4e441fca78dfc36f6a78c0f7b922718f352b04 (patch)
treedb2f8157586ac2a520719e70fb956223e643aeda /tests/bugs195
parentd8821e28d6e4b59ab451dc166e96698646a6e750 (diff)
downloadaspectj-aa4e441fca78dfc36f6a78c0f7b922718f352b04.tar.gz
aspectj-aa4e441fca78dfc36f6a78c0f7b922718f352b04.zip
Moved tests around for avoiding weaving switch infrastructure method
Diffstat (limited to 'tests/bugs195')
-rw-r--r--tests/bugs195/switch/Azpect.java5
-rw-r--r--tests/bugs195/switch/HelloWorldEnumSwitch.java22
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/bugs195/switch/Azpect.java b/tests/bugs195/switch/Azpect.java
new file mode 100644
index 000000000..4e5c62e4a
--- /dev/null
+++ b/tests/bugs195/switch/Azpect.java
@@ -0,0 +1,5 @@
+aspect Azpect {
+ before(): within(HelloWorldEnumSwitch) {
+ System.out.println(">"+thisJoinPointStaticPart.getSourceLocation().getLine());
+ }
+}
diff --git a/tests/bugs195/switch/HelloWorldEnumSwitch.java b/tests/bugs195/switch/HelloWorldEnumSwitch.java
new file mode 100644
index 000000000..59c2f58c1
--- /dev/null
+++ b/tests/bugs195/switch/HelloWorldEnumSwitch.java
@@ -0,0 +1,22 @@
+public class HelloWorldEnumSwitch {
+
+ public static void main(String[] args) {
+ switch(TestEnum.A) {
+ case A:
+ System.out.println("A");
+ break;
+ case B:
+ System.out.println("B");
+ }
+
+ }
+
+ public static enum TestEnum {
+ A,
+ B;
+
+ private TestEnum() {
+ }
+ }
+}
+