aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs151/pr125475
diff options
context:
space:
mode:
authoraclement <aclement>2006-01-30 10:22:10 +0000
committeraclement <aclement>2006-01-30 10:22:10 +0000
commit2b5329c2a672ff32f8c941f0c56e475ea58ce5f3 (patch)
tree2a96c1d4315bdc252d5bb6e14b5a435c0b78afc7 /tests/bugs151/pr125475
parentaf8ed913b0057fbe1b48d47a03c4390e7fdb591e (diff)
downloadaspectj-2b5329c2a672ff32f8c941f0c56e475ea58ce5f3.tar.gz
aspectj-2b5329c2a672ff32f8c941f0c56e475ea58ce5f3.zip
testcode for 125475/125480 (from matthew) and for enh 123423 (expose PTW type)
Diffstat (limited to 'tests/bugs151/pr125475')
-rw-r--r--tests/bugs151/pr125475/Test.java3
-rw-r--r--tests/bugs151/pr125475/TestAspect.aj4
-rw-r--r--tests/bugs151/pr125475/TestEmptyPointcutAtAspect.java10
-rw-r--r--tests/bugs151/pr125475/TestEmptyPointcutAtAspect2.java28
-rw-r--r--tests/bugs151/pr125475/aop.xml14
5 files changed, 57 insertions, 2 deletions
diff --git a/tests/bugs151/pr125475/Test.java b/tests/bugs151/pr125475/Test.java
new file mode 100644
index 000000000..b8ad663ce
--- /dev/null
+++ b/tests/bugs151/pr125475/Test.java
@@ -0,0 +1,3 @@
+public class Test {
+ public static void main (String[] args) {}
+}
diff --git a/tests/bugs151/pr125475/TestAspect.aj b/tests/bugs151/pr125475/TestAspect.aj
new file mode 100644
index 000000000..ad5cbd666
--- /dev/null
+++ b/tests/bugs151/pr125475/TestAspect.aj
@@ -0,0 +1,4 @@
+public abstract aspect TestAspect {
+
+ protected abstract pointcut scope ();
+}
diff --git a/tests/bugs151/pr125475/TestEmptyPointcutAtAspect.java b/tests/bugs151/pr125475/TestEmptyPointcutAtAspect.java
index 12334f4b9..d249621b0 100644
--- a/tests/bugs151/pr125475/TestEmptyPointcutAtAspect.java
+++ b/tests/bugs151/pr125475/TestEmptyPointcutAtAspect.java
@@ -1,6 +1,12 @@
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+
@Aspect
public class TestEmptyPointcutAtAspect {
- @Pointcut("")
- protected void scope () {}
+ @Pointcut("")
+ protected void scope () {}
+
+ @Pointcut
+ protected void scope2() {}
}
diff --git a/tests/bugs151/pr125475/TestEmptyPointcutAtAspect2.java b/tests/bugs151/pr125475/TestEmptyPointcutAtAspect2.java
new file mode 100644
index 000000000..7b92bd05b
--- /dev/null
+++ b/tests/bugs151/pr125475/TestEmptyPointcutAtAspect2.java
@@ -0,0 +1,28 @@
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class TestEmptyPointcutAtAspect2 {
+
+ @Pointcut("")
+ protected void scope () {}
+
+ @Before("within(*) && scope()")
+ public void m() {
+ System.err.println("Here!");
+ }
+}
+
+class A {
+
+ String s;
+ int i;
+
+ public static void main(String[] args) {
+ new A().foo();
+ }
+
+ public void foo() {
+ i=4;
+ s="hello";
+ }
+} \ No newline at end of file
diff --git a/tests/bugs151/pr125475/aop.xml b/tests/bugs151/pr125475/aop.xml
new file mode 100644
index 000000000..5b9dd55e6
--- /dev/null
+++ b/tests/bugs151/pr125475/aop.xml
@@ -0,0 +1,14 @@
+<aspectj>
+ <aspects>
+<!--
+ <concrete-aspect name="TraceHelloWorld" extends="org.aspectj.lib.tracing.SimpleTracing">
+ <pointcut name="tracingScope" expression="within(*)"/>
+ </concrete-aspect>
+-->
+ <concrete-aspect name="TestSubAtAspect" extends="TestAspect">
+ <pointcut name="scope" expression=""/>
+ </concrete-aspect>
+ </aspects>
+
+ <weaver options="-verbose"/>
+</aspectj>