aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base/test110
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 18:51:06 +0000
committerwisberg <wisberg>2002-12-16 18:51:06 +0000
commit144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch)
treeb12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/base/test110
parentfafae443719b26159ab2d7dac1c9b46b5e00b671 (diff)
downloadaspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz
aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip
initial version
Diffstat (limited to 'tests/base/test110')
-rw-r--r--tests/base/test110/Driver.java14
-rw-r--r--tests/base/test110/Readme.txt9
-rw-r--r--tests/base/test110/pAspect/Aspect.java9
-rw-r--r--tests/base/test110/pClass/Class.java9
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/base/test110/Driver.java b/tests/base/test110/Driver.java
new file mode 100644
index 000000000..5a9a717f9
--- /dev/null
+++ b/tests/base/test110/Driver.java
@@ -0,0 +1,14 @@
+
+import pClass.Class;
+import pAspect.Aspect;
+import org.aspectj.testing.Tester;
+
+public class Driver {
+ public static void main(String[] args) { test(); }
+
+ public static void test() {
+ Class f = new Class();
+ f.foo();
+ Tester.check(Aspect.ranAdvice, "advice on class in different package");
+ }
+}
diff --git a/tests/base/test110/Readme.txt b/tests/base/test110/Readme.txt
new file mode 100644
index 000000000..fb53602f0
--- /dev/null
+++ b/tests/base/test110/Readme.txt
@@ -0,0 +1,9 @@
+Mode: VM run
+Title: Packaged aspects referring to packaged classes
+
+This test case has an aspect and a class, each in a separate
+package. The test is to check if the weaver generates the correct
+names for the class and the aspect in the woven code.
+
+
+
diff --git a/tests/base/test110/pAspect/Aspect.java b/tests/base/test110/pAspect/Aspect.java
new file mode 100644
index 000000000..e7733f5a6
--- /dev/null
+++ b/tests/base/test110/pAspect/Aspect.java
@@ -0,0 +1,9 @@
+package pAspect;
+
+public aspect Aspect {
+ public static boolean ranAdvice = false;
+
+ before (): target(pClass.Class) && call(* foo(..)) {
+ ranAdvice = true;
+ }
+}
diff --git a/tests/base/test110/pClass/Class.java b/tests/base/test110/pClass/Class.java
new file mode 100644
index 000000000..98653c7fb
--- /dev/null
+++ b/tests/base/test110/pClass/Class.java
@@ -0,0 +1,9 @@
+package pClass;
+
+public class Class {
+ public void foo() {
+ // nothing to do here.
+ }
+}
+
+