diff options
Diffstat (limited to 'tests/design/intro/Within.java')
-rw-r--r-- | tests/design/intro/Within.java | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/design/intro/Within.java b/tests/design/intro/Within.java index 49021c1f0..3119f1d1e 100644 --- a/tests/design/intro/Within.java +++ b/tests/design/intro/Within.java @@ -1,15 +1,15 @@ +import org.aspectj.lang.annotation.SuppressAjWarnings; import org.aspectj.testing.Tester; - public class Within { public static void main(String[] args) { - C c = new C(); - c.mi(); - - Tester.check("I.mi within A1"); - Tester.check("I.mi instanceof C"); - Tester.check("I.mi instanceof I"); - - c.mc(); + C c = new C(); + c.mi(); + + Tester.check("I.mi within A1"); + Tester.check("I.mi instanceof C"); + Tester.check("I.mi instanceof I"); + + c.mc(); } } @@ -31,34 +31,34 @@ aspect A2 { aspect Test { - before (): execution(* I.*(..)) && within(C) { - Tester.checkFailed(thisJoinPoint + " I.* within C"); + @SuppressAjWarnings("adviceDidNotMatch") before(): execution(* I.*(..)) && within(C) { + Tester.checkFailed(thisJoinPoint + " I.* within C"); } - before (): execution(* I.*(..)) && within(I) { - Tester.checkFailed(thisJoinPoint + " I.* within I"); + @SuppressAjWarnings("adviceDidNotMatch") before (): execution(* I.*(..)) && within(I) { + Tester.checkFailed(thisJoinPoint + " I.* within I"); } before (): execution(* I.*(..)) && within(A1) { - Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", + Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", thisJoinPoint + " I.* within A1"); - Tester.note("I.mi within A1"); + Tester.note("I.mi within A1"); } - before (): execution(* I.*(..)) && within(A2) { + @SuppressAjWarnings("adviceDidNotMatch") before (): execution(* I.*(..)) && within(A2) { } before (): execution(* I.*(..)) && this(C) { - Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", + Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", thisJoinPoint + " I.* instanceof C"); - Tester.note("I.mi instanceof C"); + Tester.note("I.mi instanceof C"); } before (): execution(* I.*(..)) && this(I) { - Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", + Tester.checkEqual(thisJoinPoint.getSignature().getName(), "mi", thisJoinPoint + " I.* instanceof I"); - Tester.note("I.mi instanceof I"); + Tester.note("I.mi instanceof I"); } before (): execution(* I.*(..)) && this(A1) { - Tester.checkFailed(thisJoinPoint + " I.* instanceof A1"); + Tester.checkFailed(thisJoinPoint + " I.* instanceof A1"); } before (): execution(* I.*(..)) && this(A2) { - Tester.checkFailed(thisJoinPoint + " I.* instanceof A2"); + Tester.checkFailed(thisJoinPoint + " I.* instanceof A2"); } } |