summaryrefslogtreecommitdiffstats
path: root/tests/java5/generics/itds/sharing
diff options
context:
space:
mode:
authoraclement <aclement>2005-08-22 17:00:01 +0000
committeraclement <aclement>2005-08-22 17:00:01 +0000
commit1abe388fddf09811e19dbb1405ed8d81c0cec694 (patch)
tree370ef5cb166a1e22a2755020e104b4d6d95c3984 /tests/java5/generics/itds/sharing
parentffec34a47eb415e55b132be4f73d73c9ae4aadd5 (diff)
downloadaspectj-1abe388fddf09811e19dbb1405ed8d81c0cec694.tar.gz
aspectj-1abe388fddf09811e19dbb1405ed8d81c0cec694.zip
genericitds: tests moved around and activated in GenericsTests
Diffstat (limited to 'tests/java5/generics/itds/sharing')
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectA.aj19
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectB.aj19
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectC.aj24
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectD.aj24
-rw-r--r--tests/java5/generics/itds/sharing/GenericAspectE.aj18
-rw-r--r--tests/java5/generics/itds/sharing/MethodA4.aj2
-rw-r--r--tests/java5/generics/itds/sharing/MethodQ.aj2
7 files changed, 3 insertions, 105 deletions
diff --git a/tests/java5/generics/itds/sharing/GenericAspectA.aj b/tests/java5/generics/itds/sharing/GenericAspectA.aj
deleted file mode 100644
index fcb3090ea..000000000
--- a/tests/java5/generics/itds/sharing/GenericAspectA.aj
+++ /dev/null
@@ -1,19 +0,0 @@
-// Simple - adding an interface to a type via a generic aspect and decp
-abstract aspect GenericAspect<A> {
-
- declare parents: A implements SimpleI;
-
- interface SimpleI {}
-
-}
-
-aspect GenericAspectA extends GenericAspect<Base> {
- public static void main(String []argv) {
- Base b = new Base();
- if (!(b instanceof SimpleI))
- throw new RuntimeException("Base should implement SimpleI!");
- }
-}
-
-class Base {}
-
diff --git a/tests/java5/generics/itds/sharing/GenericAspectB.aj b/tests/java5/generics/itds/sharing/GenericAspectB.aj
deleted file mode 100644
index 39d262223..000000000
--- a/tests/java5/generics/itds/sharing/GenericAspectB.aj
+++ /dev/null
@@ -1,19 +0,0 @@
-// Decp a generic interface
-abstract aspect GenericAspect<A> {
-
- declare parents: A implements SimpleI;
-
- interface SimpleI<X> {}
-
-}
-
-aspect GenericAspectB extends GenericAspect<Base> {
- public static void main(String []argv) {
- Base b = new Base();
- if (!(b instanceof SimpleI))
- throw new RuntimeException("Base should implement SimpleI!");
- }
-}
-
-class Base {}
-
diff --git a/tests/java5/generics/itds/sharing/GenericAspectC.aj b/tests/java5/generics/itds/sharing/GenericAspectC.aj
deleted file mode 100644
index 3e1d6c6ee..000000000
--- a/tests/java5/generics/itds/sharing/GenericAspectC.aj
+++ /dev/null
@@ -1,24 +0,0 @@
-// Decp an interface with an ITD method on it
-abstract aspect GenericAspect<A> {
-
- interface SimpleI {}
-
- declare parents: A implements SimpleI;
-
- public int SimpleI.m() { return 4;}
-
-}
-
-aspect GenericAspectC extends GenericAspect<Base> {
- public static void main(String []argv) {
- Base b = new Base();
-
- if (!(b instanceof SimpleI))
- throw new RuntimeException("Base should implement SimpleI!");
-
- int i = b.m();
- }
-}
-
-class Base {}
-
diff --git a/tests/java5/generics/itds/sharing/GenericAspectD.aj b/tests/java5/generics/itds/sharing/GenericAspectD.aj
deleted file mode 100644
index 30775a593..000000000
--- a/tests/java5/generics/itds/sharing/GenericAspectD.aj
+++ /dev/null
@@ -1,24 +0,0 @@
-// Decp an interface with an ITD field
-abstract aspect GenericAspect<A> {
-
- interface SimpleI {}
-
- declare parents: A implements SimpleI;
-
- public int SimpleI.n;
-
-}
-
-aspect GenericAspectD extends GenericAspect<Base> {
- public static void main(String []argv) {
- Base b = new Base();
-
- if (!(b instanceof SimpleI))
- throw new RuntimeException("Base should implement SimpleI!");
-
- b.n=42;
- }
-}
-
-class Base {}
-
diff --git a/tests/java5/generics/itds/sharing/GenericAspectE.aj b/tests/java5/generics/itds/sharing/GenericAspectE.aj
deleted file mode 100644
index 60bf8cd53..000000000
--- a/tests/java5/generics/itds/sharing/GenericAspectE.aj
+++ /dev/null
@@ -1,18 +0,0 @@
-abstract aspect GenericAspect<A> {
-
- declare parents: A implements IUtil;
-
- //public void IUtil<Z>.print(Z n) { System.err.println(n); }
-}
-
-interface IUtil<N extends Number> { }
-
-aspect GenericAspectE extends GenericAspect<Base> {
- public static void main(String []argv) {
- Base b = new Base();
- // b.print("hello");
- }
-}
-
-class Base {}
-
diff --git a/tests/java5/generics/itds/sharing/MethodA4.aj b/tests/java5/generics/itds/sharing/MethodA4.aj
index 64c2aced0..192a7dc98 100644
--- a/tests/java5/generics/itds/sharing/MethodA4.aj
+++ b/tests/java5/generics/itds/sharing/MethodA4.aj
@@ -12,6 +12,8 @@ class Base<N extends Number> { }
aspect X {
public List<Z> Base<Z>.m() { // OK, Z becomes N in return type
List<Z> lz = new ArrayList<Z>();
+ List<String> ls;
+
return lz;
};
}
diff --git a/tests/java5/generics/itds/sharing/MethodQ.aj b/tests/java5/generics/itds/sharing/MethodQ.aj
index bfe415a28..979c3b39a 100644
--- a/tests/java5/generics/itds/sharing/MethodQ.aj
+++ b/tests/java5/generics/itds/sharing/MethodQ.aj
@@ -9,7 +9,7 @@ public class MethodQ {
}
}
-class SimpleClass<N extends Number> {
+class SimpleClass<N> {// extends Number> {
// This is what we are trying to mimic with our ITD
//public <L extends Number> void m(List<L> ll1, List<N> lz,List<L> ll2) {}
}