summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-25 11:17:21 +0000
committeraclement <aclement>2005-10-25 11:17:21 +0000
commite638a272e0d7e886bdcac33d7ca9fafa69c1b278 (patch)
treecfd4d38e96c9ca4e4f1598ed55d303a0e2b02775 /tests/java5/generics
parent76ebbc76add2abd815b3a8b5ea0beb11c94c8c49 (diff)
downloadaspectj-e638a272e0d7e886bdcac33d7ca9fafa69c1b278.tar.gz
aspectj-e638a272e0d7e886bdcac33d7ca9fafa69c1b278.zip
some bridge method testcases and impl for 108101
Diffstat (limited to 'tests/java5/generics')
-rw-r--r--tests/java5/generics/itds/bridgeMethods/Sub4.java3
-rw-r--r--tests/java5/generics/itds/bridgeMethods/Super4.java3
-rw-r--r--tests/java5/generics/itds/bridgeMethods/X1.aj2
-rw-r--r--tests/java5/generics/itds/bridgeMethods/X2.aj2
-rw-r--r--tests/java5/generics/itds/bridgeMethods/X3.aj3
-rw-r--r--tests/java5/generics/itds/bridgeMethods/X4.aj10
6 files changed, 17 insertions, 6 deletions
diff --git a/tests/java5/generics/itds/bridgeMethods/Sub4.java b/tests/java5/generics/itds/bridgeMethods/Sub4.java
new file mode 100644
index 000000000..ceff1638c
--- /dev/null
+++ b/tests/java5/generics/itds/bridgeMethods/Sub4.java
@@ -0,0 +1,3 @@
+public class Sub4 {
+ public Integer m() {return new Integer(42);}
+}
diff --git a/tests/java5/generics/itds/bridgeMethods/Super4.java b/tests/java5/generics/itds/bridgeMethods/Super4.java
new file mode 100644
index 000000000..cd4237a41
--- /dev/null
+++ b/tests/java5/generics/itds/bridgeMethods/Super4.java
@@ -0,0 +1,3 @@
+public class Super4 {
+ public Object m() { return null;}
+}
diff --git a/tests/java5/generics/itds/bridgeMethods/X1.aj b/tests/java5/generics/itds/bridgeMethods/X1.aj
index 2f085de6a..5c5df61e2 100644
--- a/tests/java5/generics/itds/bridgeMethods/X1.aj
+++ b/tests/java5/generics/itds/bridgeMethods/X1.aj
@@ -2,7 +2,5 @@ public aspect X1 {
public static void main(String []argv) {
Super1 s = new Sub1();
Integer i = (Integer)s.m();
-
- Util.dumpMethods("Sub1");
}
}
diff --git a/tests/java5/generics/itds/bridgeMethods/X2.aj b/tests/java5/generics/itds/bridgeMethods/X2.aj
index ce8f1a542..11ea07c5c 100644
--- a/tests/java5/generics/itds/bridgeMethods/X2.aj
+++ b/tests/java5/generics/itds/bridgeMethods/X2.aj
@@ -4,7 +4,5 @@ public aspect X2 {
public static void main(String []argv) {
Super2 s = new Sub2();
Integer i = (Integer)s.m();
-
- Util.dumpMethods("Sub2");
}
}
diff --git a/tests/java5/generics/itds/bridgeMethods/X3.aj b/tests/java5/generics/itds/bridgeMethods/X3.aj
index 5bd400d10..e83af6b26 100644
--- a/tests/java5/generics/itds/bridgeMethods/X3.aj
+++ b/tests/java5/generics/itds/bridgeMethods/X3.aj
@@ -5,7 +5,6 @@ public aspect X3 {
public static void main(String []argv) {
Super3 s = new Sub3();
Integer i = (Integer)s.m();
-
- Util.dumpMethods("Sub3");
+ if (i!=42) throw new RuntimeException("Should be 42 but is "+i);
}
}
diff --git a/tests/java5/generics/itds/bridgeMethods/X4.aj b/tests/java5/generics/itds/bridgeMethods/X4.aj
new file mode 100644
index 000000000..53333c875
--- /dev/null
+++ b/tests/java5/generics/itds/bridgeMethods/X4.aj
@@ -0,0 +1,10 @@
+public aspect X4 {
+
+ declare parents: Sub4 extends Super4;
+
+ public static void main(String []argv) {
+ Super4 s = new Sub4();
+ Integer i = (Integer)s.m();
+ if (i!=42) throw new RuntimeException("Should be 42 but is "+i);
+ }
+}