diff options
author | aclement <aclement> | 2005-02-17 14:42:31 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-02-17 14:42:31 +0000 |
commit | e282c5d4de57310227b71ac543cdbb7be36e84ca (patch) | |
tree | 799f4f2a2ae43e2e50b49b8ef794b16b25b50912 /tests | |
parent | 14853f9256e2c3ccc6a521b753c42cd366944320 (diff) | |
download | aspectj-e282c5d4de57310227b71ac543cdbb7be36e84ca.tar.gz aspectj-e282c5d4de57310227b71ac543cdbb7be36e84ca.zip |
SuppressAjWarnings test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/java5/suppressedWarnings/A.java | 7 | ||||
-rw-r--r-- | tests/java5/suppressedWarnings/A1.aj | 6 | ||||
-rw-r--r-- | tests/java5/suppressedWarnings/A2.aj | 13 | ||||
-rw-r--r-- | tests/java5/suppressedWarnings/A3.aj | 13 | ||||
-rw-r--r-- | tests/java5/suppressedWarnings/Suppression1.aj | 32 |
5 files changed, 71 insertions, 0 deletions
diff --git a/tests/java5/suppressedWarnings/A.java b/tests/java5/suppressedWarnings/A.java new file mode 100644 index 000000000..394703c2a --- /dev/null +++ b/tests/java5/suppressedWarnings/A.java @@ -0,0 +1,7 @@ +import org.aspectj.lang.annotation.*; + +public class A { + + public static void main(String [] argv) { + } +} diff --git a/tests/java5/suppressedWarnings/A1.aj b/tests/java5/suppressedWarnings/A1.aj new file mode 100644 index 000000000..1770fe39f --- /dev/null +++ b/tests/java5/suppressedWarnings/A1.aj @@ -0,0 +1,6 @@ +import org.aspectj.lang.annotation.*; +public aspect A1 { + + before(): execution(* foo(..)) { // wont match + } +} diff --git a/tests/java5/suppressedWarnings/A2.aj b/tests/java5/suppressedWarnings/A2.aj new file mode 100644 index 000000000..c56dbf02d --- /dev/null +++ b/tests/java5/suppressedWarnings/A2.aj @@ -0,0 +1,13 @@ +import org.aspectj.lang.annotation.*; +public aspect A2 { + + before(): execution(* foo(..)) { // wont match + } + + @SuppressAjWarnings + before(): execution(* foo(..)) { // wont match - but suppressed + } + @SuppressAjWarnings("Bananas") // this wont prevent the lint advice not match warning + before(): execution(* foo(..)) { // wont match + } +} diff --git a/tests/java5/suppressedWarnings/A3.aj b/tests/java5/suppressedWarnings/A3.aj new file mode 100644 index 000000000..a57de6f7d --- /dev/null +++ b/tests/java5/suppressedWarnings/A3.aj @@ -0,0 +1,13 @@ +import org.aspectj.lang.annotation.*; +public aspect A3 { + + before(): execution(* foo(..)) { // wont match + } + + @SuppressAjWarnings("adviceDidNotMatch") + before(): execution(* foo(..)) { // wont match - but suppressed + } + + before(): execution(* foo(..)) { // wont match + } +} diff --git a/tests/java5/suppressedWarnings/Suppression1.aj b/tests/java5/suppressedWarnings/Suppression1.aj new file mode 100644 index 000000000..2b1d869e3 --- /dev/null +++ b/tests/java5/suppressedWarnings/Suppression1.aj @@ -0,0 +1,32 @@ +import org.aspectj.lang.annotation.*; + +// 5 pieces of advice. Numbers 2, 4, 5 should not report a warning for not matching +public class Suppression1 { + + public static void main(String []argv) { + } +} + + +aspect A { + + before(): call(* *(..)) && !within(A) {//13 + } + + @SuppressAjWarnings + before(): call(* *(..)) && !within(A) {//17 + } + + @SuppressAjWarnings("bananas") + before(): call(* *(..)) && !within(A) {//21 + } + + @SuppressAjWarnings("adviceDidNotMatch") + before(): call(* *(..)) && !within(A) {//25 + } + + @SuppressAjWarnings({"adviceDidNotMatch","custard"}) + before(): call(* *(..)) && !within(A) {//29 + } + +} |