aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs152
diff options
context:
space:
mode:
authoracolyer <acolyer>2006-04-24 17:46:06 +0000
committeracolyer <acolyer>2006-04-24 17:46:06 +0000
commit6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0 (patch)
treef68ddd216a18f27c517118dc75fa963ebaf2c5c2 /tests/bugs152
parent8c084b533078c9d640aa9d1530e673d744d546ad (diff)
downloadaspectj-6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0.tar.gz
aspectj-6b2526fdda56e30d8a151ca0b9bd16ecb690d3d0.zip
test cases for pr138215, 219, and 223.
Diffstat (limited to 'tests/bugs152')
-rw-r--r--tests/bugs152/pr138215/pr138215.aj19
-rw-r--r--tests/bugs152/pr138219/PerThisWithReference.aj7
-rw-r--r--tests/bugs152/pr138219/SomeOtherType.aj5
-rw-r--r--tests/bugs152/pr138220/AtAspectWithPerClause.aj17
-rw-r--r--tests/bugs152/pr138223/DoubleAnnotationMatching.aj33
5 files changed, 81 insertions, 0 deletions
diff --git a/tests/bugs152/pr138215/pr138215.aj b/tests/bugs152/pr138215/pr138215.aj
new file mode 100644
index 000000000..7580b146b
--- /dev/null
+++ b/tests/bugs152/pr138215/pr138215.aj
@@ -0,0 +1,19 @@
+package abc;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class pr138215 {
+
+ @DeclareWarning("fooExecution()")
+ public static final String warning = "no foos please";
+
+ @Pointcut("execution(* foo())")
+ public void fooExecution() {}
+
+}
+
+class Fooey {
+
+ public void foo() {}
+
+} \ No newline at end of file
diff --git a/tests/bugs152/pr138219/PerThisWithReference.aj b/tests/bugs152/pr138219/PerThisWithReference.aj
new file mode 100644
index 000000000..c53466dfe
--- /dev/null
+++ b/tests/bugs152/pr138219/PerThisWithReference.aj
@@ -0,0 +1,7 @@
+public aspect PerThisWithReference perthis(mypc()) {
+
+
+ pointcut mypc() : SomeOtherType.pc();
+
+
+} \ No newline at end of file
diff --git a/tests/bugs152/pr138219/SomeOtherType.aj b/tests/bugs152/pr138219/SomeOtherType.aj
new file mode 100644
index 000000000..51f0f3e5c
--- /dev/null
+++ b/tests/bugs152/pr138219/SomeOtherType.aj
@@ -0,0 +1,5 @@
+public aspect SomeOtherType {
+
+ public pointcut pc() : execution(* *(..));
+
+} \ No newline at end of file
diff --git a/tests/bugs152/pr138220/AtAspectWithPerClause.aj b/tests/bugs152/pr138220/AtAspectWithPerClause.aj
new file mode 100644
index 000000000..729644328
--- /dev/null
+++ b/tests/bugs152/pr138220/AtAspectWithPerClause.aj
@@ -0,0 +1,17 @@
+import org.aspectj.lang.annotation.*;
+
+@Aspect("perthis(pc())")
+public class AtAspectWithPerClause {
+
+ @Pointcut("execution(* *(..))")
+ public void pc() {}
+
+}
+
+@Aspect
+class Foo {
+
+ @Pointcut("execution(* *(..))")
+ public void pc() {}
+
+} \ No newline at end of file
diff --git a/tests/bugs152/pr138223/DoubleAnnotationMatching.aj b/tests/bugs152/pr138223/DoubleAnnotationMatching.aj
new file mode 100644
index 000000000..415309421
--- /dev/null
+++ b/tests/bugs152/pr138223/DoubleAnnotationMatching.aj
@@ -0,0 +1,33 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Tx {
+ boolean readOnly() default false;
+}
+
+public aspect DoubleAnnotationMatching {
+
+
+ pointcut methodInTxType(Tx tx) :
+ execution(* *(..)) && @this(tx) && if(tx.readOnly());
+
+ pointcut txMethod(Tx tx) :
+ execution(* *(..)) && @annotation(tx) && if(tx.readOnly());
+
+ pointcut transactionalOperation() :
+ methodInTxType(Tx) || txMethod(Tx);
+
+ before() : transactionalOperation() {
+ // do something
+ }
+
+}
+
+@Tx class Foo {
+
+ public void foo() {}
+
+ @Tx public void bar() {}
+
+
+} \ No newline at end of file