aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-19 13:51:15 +0000
committeraclement <aclement>2005-12-19 13:51:15 +0000
commit93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782 (patch)
treed2ef5d15612135e9752d0b2af51382908a15c0b4 /tests
parent0de667394fefef642b8660e39e0e6dc723f609de (diff)
downloadaspectj-93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782.tar.gz
aspectj-93f74cbbd62ebdc6d0ae1f050438f94f2f0eb782.zip
more tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/decps/Basic2b.java2
-rw-r--r--tests/java5/decps/Basic3b.java2
-rw-r--r--tests/java5/decps/Basic3c.java39
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml6
5 files changed, 49 insertions, 3 deletions
diff --git a/tests/java5/decps/Basic2b.java b/tests/java5/decps/Basic2b.java
index 59092e5c6..03c88f80d 100644
--- a/tests/java5/decps/Basic2b.java
+++ b/tests/java5/decps/Basic2b.java
@@ -14,7 +14,7 @@ public class Basic2b {
interface I {
}
- class IImpl implements I {
+ static class IImpl implements I {
public void m2() { }
}
diff --git a/tests/java5/decps/Basic3b.java b/tests/java5/decps/Basic3b.java
index e2bb111d1..1d4ecfe5a 100644
--- a/tests/java5/decps/Basic3b.java
+++ b/tests/java5/decps/Basic3b.java
@@ -21,7 +21,7 @@ public class Basic3b {
public void m4();
}
- class IImpl implements I {
+ static class IImpl implements I {
public void m2() { }
public void m3() { }
public void m4() { }
diff --git a/tests/java5/decps/Basic3c.java b/tests/java5/decps/Basic3c.java
new file mode 100644
index 000000000..f050054e4
--- /dev/null
+++ b/tests/java5/decps/Basic3c.java
@@ -0,0 +1,39 @@
+import org.aspectj.lang.annotation.*;
+
+public class Basic3c {
+ public static void main(String []argv) {
+ Basic3c b = new Basic3c();
+ if (!(b instanceof X.I)) throw new RuntimeException("Basic3c should implement I");
+ ((X.I)b).m2();
+ ((X.I)b).m3();
+ ((X.I)b).m2();
+ ((X.I)b).m4();
+ }
+}
+
+
+
+@Aspect class X {
+
+ interface I {
+ public void m2();
+ public void m3();
+ public void m4();
+ }
+
+ class IImpl implements I {
+ public void m2() { }
+ public void m3() { }
+ public void m4() { }
+ }
+
+
+ @DeclareParents(value="Basic3c",defaultImpl=IImpl.class)
+ private I simplefield;
+
+
+ @Before("call(* *(..))")
+ public void advice1() {}
+
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index 3a972a7c5..75bb203f3 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -46,7 +46,8 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testDecps2() { runTest("decps - 2");}
public void testDecps2b() { runTest("decps - 2b");}
public void testDecps3() { runTest("decps - 3");}
- // public void testDecps3b() { runTest("decps - 3b");}
+ public void testDecps3b() { runTest("decps - 3b");}
+ public void testDecps3c() { runTest("decps - 3c");}
public void testVarargsNPE_pr120826() { runTest("varargs NPE");}
public void testNamedPointcutPertarget_pr120521() { runTest("named pointcut not resolved in pertarget pointcut");}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 9eb5da00f..7115d779e 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -160,6 +160,12 @@
<run class="Basic3b"/>
</ajc-test>
+ <ajc-test dir="java5/decps" title="decps - 3c">
+ <compile files="Basic3c.java" options="-1.5">
+ </compile>
+ <run class="Basic3c"/>
+ </ajc-test>
+
<ajc-test dir="bugs150/pr119570" pr="119570" title="spurious override method warning">