diff options
author | jhugunin <jhugunin> | 2002-12-20 22:48:48 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2002-12-20 22:48:48 +0000 |
commit | 9081949c3aca2636eab2598b57ddbda16563dcee (patch) | |
tree | bdc2b7562510d4ada368d9ec266a7a32ed6f16cf | |
parent | c86ae3fc8bc798521dfa3449bebf749c446509ff (diff) | |
download | aspectj-9081949c3aca2636eab2598b57ddbda16563dcee.tar.gz aspectj-9081949c3aca2636eab2598b57ddbda16563dcee.zip |
expanded coverage
-rw-r--r-- | tests/new/options11/aspectlib1.jar | bin | 1158 -> 1158 bytes | |||
-rw-r--r-- | tests/new/options11/aspectlib2.jar | bin | 967 -> 967 bytes | |||
-rw-r--r-- | tests/new/options11/injar.jar | bin | 363 -> 363 bytes | |||
-rw-r--r-- | tests/new/packagevisibility/PackagesAndAdvice.java | 4 | ||||
-rw-r--r-- | tests/new/packagevisibility/PackagesAndAdviceCf.java | 39 | ||||
-rw-r--r-- | tests/new/subaspects/child/ChildCE.java | 8 | ||||
-rw-r--r-- | tests/new/subaspects/parent/ParentCE.java | 8 |
7 files changed, 54 insertions, 5 deletions
diff --git a/tests/new/options11/aspectlib1.jar b/tests/new/options11/aspectlib1.jar Binary files differindex 053a7671d..bbad52452 100644 --- a/tests/new/options11/aspectlib1.jar +++ b/tests/new/options11/aspectlib1.jar diff --git a/tests/new/options11/aspectlib2.jar b/tests/new/options11/aspectlib2.jar Binary files differindex 603218b93..50de83274 100644 --- a/tests/new/options11/aspectlib2.jar +++ b/tests/new/options11/aspectlib2.jar diff --git a/tests/new/options11/injar.jar b/tests/new/options11/injar.jar Binary files differindex 6fd5aba49..c37fed014 100644 --- a/tests/new/options11/injar.jar +++ b/tests/new/options11/injar.jar diff --git a/tests/new/packagevisibility/PackagesAndAdvice.java b/tests/new/packagevisibility/PackagesAndAdvice.java index ca17f0da7..199df0cbe 100644 --- a/tests/new/packagevisibility/PackagesAndAdvice.java +++ b/tests/new/packagevisibility/PackagesAndAdvice.java @@ -24,9 +24,7 @@ aspect A { static String message = "-advised"; String around(String s): - call(String doIt(String)) && args(s) && - (target(packagevisibility.testPackage.Class1) || - target(packagevisibility.testPackage.Class2)) { + call(String doIt(String)) && args(s) { String result = s + message; result += A1.message; return result + proceed(s); diff --git a/tests/new/packagevisibility/PackagesAndAdviceCf.java b/tests/new/packagevisibility/PackagesAndAdviceCf.java new file mode 100644 index 000000000..1abfea48e --- /dev/null +++ b/tests/new/packagevisibility/PackagesAndAdviceCf.java @@ -0,0 +1,39 @@ +package packagevisibility; +import org.aspectj.testing.Tester; + +import packagevisibility.testPackage.*; + +public class PackagesAndAdviceCf +{ + public static void main(String[] args) { test(); } + + public static void test() { + packagevisibility.testPackage.Class1 c1 = + new packagevisibility.testPackage.Class1(); + Tester.checkEqual(c1.doIt("-1"), + "-1-advised-advised1-1-class1", + "publically visible"); + Tester.checkEqual(c1.doItToClass2("-2"), + "-2-advised-advised1-2-class2", + "package visible"); + } + +} + +aspect A { + static String message = "-advised"; + + String around(String s): + call(String doIt(String)) && args(s) && + (target(packagevisibility.testPackage.Class1) || + target(packagevisibility.testPackage.Class2)) { // Cf type not visible + String result = s + message; + result += A1.message; + return result + proceed(s); + } + +} + +class A1 { + static String message = "-advised1"; +} diff --git a/tests/new/subaspects/child/ChildCE.java b/tests/new/subaspects/child/ChildCE.java index 4a0b8377c..ac0f3694e 100644 --- a/tests/new/subaspects/child/ChildCE.java +++ b/tests/new/subaspects/child/ChildCE.java @@ -6,7 +6,7 @@ import parent.ParentCE; import org.aspectj.testing.*; -public class ChildCE { +public class ChildCE implements I { public static void main (String[] args) { new Target().run(); Tester.checkAllEvents(); @@ -17,6 +17,10 @@ public class ChildCE { } } +interface I { + public pointcut fromInterface(): call(* *(..)); +} + class Target { public void run(){ Tester.event("run"); @@ -24,7 +28,7 @@ class Target { } /** @testcase PR#647 concrete aspect unable to access abstract package-private pointcut in parent for overriding */ -aspect ParentChild extends ParentCE {// expect CE here: child does not define "define()" b/c inaccessible +aspect ParentChild extends ParentCE implements I {// expect CE here: child does not define "define()" b/c inaccessible protected pointcut define() : call(public void Target.run()); } diff --git a/tests/new/subaspects/parent/ParentCE.java b/tests/new/subaspects/parent/ParentCE.java index b64a7b66e..9c55f5716 100644 --- a/tests/new/subaspects/parent/ParentCE.java +++ b/tests/new/subaspects/parent/ParentCE.java @@ -6,10 +6,18 @@ import org.aspectj.testing.*; /** @testcase PR#647 concrete aspect unable to access abstract package-private pointcut in parent for overriding */ public abstract aspect ParentCE { abstract pointcut define(); + + public abstract pointcut fromInterface(); + + pointcut withSig(int i): args(i); + before() : define() { Tester.event("define"); } } aspect Child extends ParentCE { pointcut define() : call(public void Runnable.run()); + public pointcut fromInterface(): call(* *(..)); + + pointcut withSig(): args(); // should be CE incompatible params } |