aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs163
diff options
context:
space:
mode:
authoraclement <aclement>2008-12-09 00:20:34 +0000
committeraclement <aclement>2008-12-09 00:20:34 +0000
commit7327bc3771417a7a65a658ad584c4f7a851a1109 (patch)
treecf0cd1ceb6d91df700731ce70d23d3d4c4aab991 /tests/bugs163
parent1ee5cebaebb381778cb15806fc5a9f25d7d8bf5b (diff)
downloadaspectj-7327bc3771417a7a65a658ad584c4f7a851a1109.tar.gz
aspectj-7327bc3771417a7a65a658ad584c4f7a851a1109.zip
253109:tests
Diffstat (limited to 'tests/bugs163')
-rw-r--r--tests/bugs163/pr253109/CodeFive.java12
-rw-r--r--tests/bugs163/pr253109/CodeSix.java265
2 files changed, 277 insertions, 0 deletions
diff --git a/tests/bugs163/pr253109/CodeFive.java b/tests/bugs163/pr253109/CodeFive.java
new file mode 100644
index 000000000..a453022d9
--- /dev/null
+++ b/tests/bugs163/pr253109/CodeFive.java
@@ -0,0 +1,12 @@
+import java.util.*;
+
+public aspect CodeFive {
+
+ void around(): execution(* m1(..)) && args(ArrayList) {}
+
+}
+
+class C {
+
+ public void m1(List<Integer> li) {}
+}
diff --git a/tests/bugs163/pr253109/CodeSix.java b/tests/bugs163/pr253109/CodeSix.java
new file mode 100644
index 000000000..e2772b4d1
--- /dev/null
+++ b/tests/bugs163/pr253109/CodeSix.java
@@ -0,0 +1,265 @@
+import java.util.List;
+import java.util.ArrayList;
+
+
+public class C<E extends Number> {
+// void m1(List<Integer> e){}
+// void m2(List<? extends Number> e){}
+// void m3(List<Number> e){}
+// void m4(List<?> e){}
+// void m5(List<E> e){}
+// void m6(List<? extends E> e){}
+// void m7(List<? extends List<? extends E>> e){}
+// void m8(List e){}
+// void m9(E e){}
+}
+
+class A1{}
+class B1 extends A1{}
+class C1 extends B1{}
+class D1 extends C1{}
+
+class D2<E2 extends C1>{
+ void m5(List<E2> e){}
+}
+
+aspect AC{
+//void around(): execution(* C.m1(..)) && args(List<Integer>){} //: Should
+match (it does)
+//void around(): execution(* C.m1(..)) && args(ArrayList<Integer>){}//: Should
+runtime check (it does!)
+//void around(): execution(* C.m1(..)) && args(List<Number>){}//: Should not
+match (it does not!)
+//void around(): execution(* C.m1(..)) && args(ArrayList<Number>){}//: Should
+not match (it does not)
+//void around(): execution(* C.m1(..)) && args(List<? extends Number>){}//:
+Should match (it does)
+//void around(): execution(* C.m1(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check (it does!)
+//void around(): execution(* C.m1(..)) && args(List){}//: Should match (it
+does)
+//void around(): execution(* C.m1(..)) && args(ArrayList){}//: Should runtime
+check (it does not match!)ERROR
+//void around(): execution(* C.m1(..)) && args(List<?>){}//: Should match (it
+does)
+//void around(): execution(* C.m1(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does not match!)
+//void around(): execution(* C.m1(..)) && args(ArrayList<String>){}//: Should
+not match (it does not match!)
+
+//void around(): execution(* C.m2(..)) && args(List<Integer>){} //: Should not
+match (but it does) ERROR
+//void around(): execution(* C.m2(..)) && args(ArrayList<Integer>){}//: Should
+not match (but it does!) ERROR
+//void around(): execution(* C.m2(..)) && args(List<Number>){} //: Should not
+match (but it does) ERROR
+//void around(): execution(* C.m2(..)) && args(ArrayList<Number>){}//: Should
+not runtime check (but it does!) ERROR
+//void around(): execution(* C.m2(..)) && args(List<? extends Number>){}//:
+Should match (it does)
+//void around(): execution(* C.m2(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check (it does!)
+//void around(): execution(* C.m2(..)) && args(List){}//: Should match (it
+does)
+//void around(): execution(* C.m2(..)) && args(ArrayList){}//: Should runtime
+check (it does not match!) ERROR
+//void around(): execution(* C.m2(..)) && args(List<?>){}//: Should match (it
+does)
+//void around(): execution(* C.m2(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does!)
+//void around(): execution(* C.m2(..)) && args(ArrayList<String>){}//: Should
+not match (it does not match!)
+
+// void around(): execution(* C.m3(..)) && args(List<Integer>){} //:
+Should not match (it does not)
+// void around(): execution(* C.m3(..)) && args(ArrayList<Integer>){}//:
+Should not match (it does not)
+// void around(): execution(* C.m3(..)) && args(List<Number>){}//: Should
+match (it does)
+// void around(): execution(* C.m3(..)) && args(ArrayList<Number>){}//:
+Should runtime match (it does)
+// void around(): execution(* C.m3(..)) && args(List<? extends
+Number>){}//: Should match (it does)
+// void around(): execution(* C.m3(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check (it does!)
+// void around(): execution(* C.m3(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m3(..)) && args(ArrayList){}//: Should
+runtime check (it does not match!) ERROR
+// void around(): execution(* C.m3(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m3(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m3(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* C.m4(..)) && args(List<Integer>){} //:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m4(..)) && args(ArrayList<Integer>){}//:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m4(..)) && args(List<Number>){}//: Should
+not match (but it does) ERROR
+// void around(): execution(* C.m4(..)) && args(ArrayList<Number>){}//:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m4(..)) && args(List<? extends
+Number>){}//: Should not match (but it does) ERROR
+// void around(): execution(* C.m4(..)) && args(ArrayList<? extends
+Number>){}//: Should not match (but it does!) ERROR
+// void around(): execution(* C.m4(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m4(..)) && args(ArrayList){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m4(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m4(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m4(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* C.m5(..)) && args(List<Integer>){} //:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m5(..)) && args(ArrayList<Integer>){}//:
+Should not match (but it does!) ERROR
+// void around(): execution(* C.m5(..)) && args(List<Number>){}//: Should
+not match (but it does!) ERROR
+// void around(): execution(* C.m5(..)) && args(ArrayList<Number>){}//:
+Should not match (it does) ERROR
+// void around(): execution(* C.m5(..)) && args(List<? extends
+Number>){}//: Should match (it does)
+// void around(): execution(* C.m5(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check (it does!)
+// void around(): execution(* C.m5(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m5(..)) && args(ArrayList){}//: Should
+runtime check (it does not match!) ERROR
+// void around(): execution(* C.m5(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m5(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does not match!)
+// void around(): execution(* C.m5(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* D2.m5(..)) && args(List<D1>){} //: Should
+not match (but it does) ERROR
+// void around(): execution(* D2.m5(..)) && args(ArrayList<D1>){}//:
+Should not match (but it does!) ERROR
+// void around(): execution(* D2.m5(..)) && args(List<C1>){}//: Should
+not match (but it does!) ERROR
+// void around(): execution(* D2.m5(..)) && args(ArrayList<C1>){}//:
+Should not match (it does) ERROR
+// void around(): execution(* D2.m5(..)) && args(List<? extends B1>){}//:
+Should match (it does)
+// void around(): execution(* D2.m5(..)) && args(ArrayList<? extends
+B1>){}//: Should runtime check (it does!)
+// void around(): execution(* D2.m5(..)) && args(List<? extends C1>){}//:
+Should match (it does)
+// void around(): execution(* D2.m5(..)) && args(ArrayList<? extends
+C1>){}//: Should runtime check (it does!)
+// void around(): execution(* D2.m5(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* D2.m5(..)) && args(ArrayList){}//: Should
+runtime check (it does not match!) ERROR
+// void around(): execution(* D2.m5(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* D2.m5(..)) && args(ArrayList<?>){}//:
+Should runtime check (it does not match!)
+// void around(): execution(* D2.m5(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* C.m6(..)) && args(List<Integer>){} //:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m6(..)) && args(ArrayList<Integer>){}//:
+Should not match (but it does!) ERROR
+// void around(): execution(* C.m6(..)) && args(List<Number>){}//: Should
+not match (but it does!) ERROR
+// void around(): execution(* C.m6(..)) && args(ArrayList<Number>){}//:
+Should not match (it does) ERROR
+// void around(): execution(* C.m6(..)) && args(List<? extends
+Number>){}//: Should match (it does)
+// void around(): execution(* C.m6(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check (it does!)
+// void around(): execution(* C.m6(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m6(..)) && args(ArrayList){}//: Should
+runtime check (it does not match!)
+// void around(): execution(* C.m6(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m6(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does not match!)
+// void around(): execution(* C.m6(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* C.m7(..)) && args(List<List<Integer>>){}
+//: Should not match (but it does) ERROR
+// void around(): execution(* C.m7(..)) &&
+args(ArrayList<List<Integer>>){}//: Should not match (but it does!) ERROR
+// void around(): execution(* C.m7(..)) && args(List<List<Number>>){}//:
+Should not match (but it does!) ERROR
+// void around(): execution(* C.m7(..)) &&
+args(ArrayList<List<Number>>){}//: Should not match (but it does) ERROR
+// void around(): execution(* C.m7(..)) && args(List<? extends
+List<Number>>){}//: Should not match (but it does) ERROR
+// void around(): execution(* C.m7(..)) && args(ArrayList< ? extends
+List<Number>>){}//: Should not match (but it does!) ERROR
+// void around(): execution(* C.m7(..)) && args(List< ? extends List<?
+extends Number>>){}//: Should match (it does!)
+// void around(): execution(* C.m7(..)) && args(ArrayList< ? extends
+List<? extends Number>>){}//: Should match (it does!)
+// void around(): execution(* C.m7(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m7(..)) && args(ArrayList){}//: Should
+runtime check (it does not match!)
+// void around(): execution(* C.m7(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m7(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m7(..)) &&
+args(ArrayList<List<String>>){}//: Should not match (it does not match!)
+
+// void around(): execution(* C.m8(..)) && args(List<Integer>){} //:
+Should match with unchecked conversion (it does)
+// void around(): execution(* C.m8(..)) && args(ArrayList<Integer>){}//:
+Should runtime check with unchecked conversion (it does!)
+// void around(): execution(* C.m8(..)) && args(List<Number>){}//: Should
+match with unchecked conversion (it does!)
+// void around(): execution(* C.m8(..)) && args(ArrayList<Number>){}//:
+Should runtime check with unchecked conversion (it does)
+// void around(): execution(* C.m8(..)) && args(List<? extends
+Number>){}//: Should match with unchecked conversion (it does!)
+// void around(): execution(* C.m8(..)) && args(ArrayList<? extends
+Number>){}//: Should runtime check with unchecked conversion (it does)
+// void around(): execution(* C.m8(..)) && args(List){}//: Should match
+(it does)
+// void around(): execution(* C.m8(..)) && args(ArrayList){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m8(..)) && args(List<?>){}//: Should
+match (it does)
+// void around(): execution(* C.m8(..)) && args(ArrayList<?>){}//: Should
+runtime check (it does!)
+// void around(): execution(* C.m8(..)) && args(ArrayList<String>){}//:
+Should not match (it does not match!)
+
+// void around(): execution(* C.m9(..)) && args(List<Integer>){} //:
+Should not match (but it does) ERROR
+// void around(): execution(* C.m9(..)) && args(ArrayList<Integer>){}//:
+Should not match (it does not match!)
+// void around(): execution(* C.m9(..)) && args(Number){}//: Should match
+(it does!)
+// void around(): execution(* C.m9(..)) && args(Integer){}//: Should
+runtime check (it does)
+// void around(): execution(* C.m9(..)) && args(List<? extends
+Number>){}//: Should not match (but it does) ERROR
+// void around(): execution(* C.m9(..)) && args(ArrayList<? extends
+Number>){}//: Should not match (it does not match!)
+// void around(): execution(* C.m9(..)) && args(List){}//: Should not
+match (but it does) ERROR
+// void around(): execution(* C.m9(..)) && args(ArrayList){}//: Should
+not match (it does not match!)
+// void around(): execution(* C.m9(..)) && args(List<?>){}//: Should not
+match (but it does) ERROR
+// void around(): execution(* C.m9(..)) && args(ArrayList<?>){}//: Should
+not match (it does not match!)
+// void around(): execution(* C.m9(..)) && args(String){}//: Should not
+match (it does not match!)
+}
+