aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-04-22 23:13:18 +0000
committerwisberg <wisberg>2003-04-22 23:13:18 +0000
commita1a51eef8d3b8d38457a7be7c06208d62c88664e (patch)
tree7bf119d2826ae4b8cc08c0d583c64eb615884631 /tests/new
parentf1d911e51803c8700edab71635036e95a968e68c (diff)
downloadaspectj-a1a51eef8d3b8d38457a7be7c06208d62c88664e.tar.gz
aspectj-a1a51eef8d3b8d38457a7be7c06208d62c88664e.zip
@testcase PR#36778 advise join points in subclass of empty interface
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/EmptyInterface.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/new/EmptyInterface.java b/tests/new/EmptyInterface.java
new file mode 100644
index 000000000..db53d592a
--- /dev/null
+++ b/tests/new/EmptyInterface.java
@@ -0,0 +1,33 @@
+
+
+import org.aspectj.testing.Tester;
+
+/** @testcase PR#36778 advise join points in subclass of empty interface */
+public class EmptyInterface {
+
+ public static void main(String[] args) {
+ new C().go();
+ // at least constructor and method execution
+ if (2 > Log.hits) {
+ Tester.check(false, Log.log.toString());
+ }
+ }
+}
+
+aspect Log {
+ static int hits;
+ static StringBuffer log = new StringBuffer();
+ interface LoggedType {}
+ declare parents: C implements LoggedType;
+ void around() : within(LoggedType+)
+ && !initialization(new(..))
+ && !preinitialization(new(..)) // 1.1 only
+ {
+ hits++;
+ log.append(thisJoinPoint + ";");
+ }
+}
+
+class C {
+ void go() {}
+}