aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2002-12-30 20:31:30 +0000
committerjhugunin <jhugunin>2002-12-30 20:31:30 +0000
commit759bac556635743571bf9041168e1db868afc187 (patch)
treee9820689291cd89346709820b6386f419accf626 /tests/new
parenta000466044a97c1071827a652c901a948d9ace28 (diff)
downloadaspectj-759bac556635743571bf9041168e1db868afc187.tar.gz
aspectj-759bac556635743571bf9041168e1db868afc187.zip
better coverage
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/DominatesTypePatternCE.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/new/DominatesTypePatternCE.java b/tests/new/DominatesTypePatternCE.java
new file mode 100644
index 000000000..a9787394d
--- /dev/null
+++ b/tests/new/DominatesTypePatternCE.java
@@ -0,0 +1,21 @@
+import org.aspectj.testing.Tester;
+
+/** @testcase subtype pattern in dominates should pick out aspect subtypes */
+public class DominatesTypePatternCE {
+ public static void main (String[] args) {
+ String s = new C().method();
+ Tester.check("pass".equals(s),
+ "\"pass\".equals(\"" + s + "\")");
+ }
+}
+
+class C {}
+
+// works if A is specified explicitly
+abstract aspect AA { declare dominates: AA, AA+; // CE, AA is matched by both pieces
+ public String C.method() { return "pass"; }
+}
+
+aspect A extends AA {
+ public String C.method() { return "fail"; }
+}