From 7327bc3771417a7a65a658ad584c4f7a851a1109 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 9 Dec 2008 00:20:34 +0000 Subject: [PATCH] 253109:tests --- tests/bugs163/pr253109/CodeFive.java | 12 ++ tests/bugs163/pr253109/CodeSix.java | 265 +++++++++++++++++++++++++++ 2 files changed, 277 insertions(+) create mode 100644 tests/bugs163/pr253109/CodeFive.java create mode 100644 tests/bugs163/pr253109/CodeSix.java 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 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 { +// void m1(List e){} +// void m2(List e){} +// void m3(List e){} +// void m4(List e){} +// void m5(List e){} +// void m6(List e){} +// void m7(List> 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{ + void m5(List e){} +} + +aspect AC{ +//void around(): execution(* C.m1(..)) && args(List){} //: Should +match (it does) +//void around(): execution(* C.m1(..)) && args(ArrayList){}//: Should +runtime check (it does!) +//void around(): execution(* C.m1(..)) && args(List){}//: Should not +match (it does not!) +//void around(): execution(* C.m1(..)) && args(ArrayList){}//: Should +not match (it does not) +//void around(): execution(* C.m1(..)) && args(List){}//: +Should match (it does) +//void around(): execution(* C.m1(..)) && args(ArrayList){}//: 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){}//: Should +not match (it does not match!) + +//void around(): execution(* C.m2(..)) && args(List){} //: Should not +match (but it does) ERROR +//void around(): execution(* C.m2(..)) && args(ArrayList){}//: Should +not match (but it does!) ERROR +//void around(): execution(* C.m2(..)) && args(List){} //: Should not +match (but it does) ERROR +//void around(): execution(* C.m2(..)) && args(ArrayList){}//: Should +not runtime check (but it does!) 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(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){}//: Should +not match (it does not match!) + +// void around(): execution(* C.m3(..)) && args(List){} //: +Should not match (it does not) +// void around(): execution(* C.m3(..)) && args(ArrayList){}//: +Should not match (it does not) +// void around(): execution(* C.m3(..)) && args(List){}//: Should +match (it does) +// void around(): execution(* C.m3(..)) && args(ArrayList){}//: +Should runtime match (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!) +// 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){}//: +Should not match (it does not match!) + +// void around(): execution(* C.m4(..)) && args(List){} //: +Should not match (but it does) ERROR +// void around(): execution(* C.m4(..)) && args(ArrayList){}//: +Should not match (but it does) ERROR +// void around(): execution(* C.m4(..)) && args(List){}//: Should +not match (but it does) ERROR +// void around(): execution(* C.m4(..)) && args(ArrayList){}//: +Should not match (but it does) ERROR +// void around(): execution(* C.m4(..)) && args(List){}//: Should not match (but it does) ERROR +// void around(): execution(* C.m4(..)) && args(ArrayList){}//: 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){}//: +Should not match (it does not match!) + +// void around(): execution(* C.m5(..)) && args(List){} //: +Should not match (but it does) ERROR +// void around(): execution(* C.m5(..)) && args(ArrayList){}//: +Should not match (but it does!) ERROR +// void around(): execution(* C.m5(..)) && args(List){}//: Should +not match (but it does!) ERROR +// void around(): execution(* C.m5(..)) && args(ArrayList){}//: +Should not match (it does) ERROR +// void around(): execution(* C.m5(..)) && args(List){}//: Should match (it does) +// void around(): execution(* C.m5(..)) && args(ArrayList){}//: 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){}//: +Should not match (it does not match!) + +// void around(): execution(* D2.m5(..)) && args(List){} //: Should +not match (but it does) ERROR +// void around(): execution(* D2.m5(..)) && args(ArrayList){}//: +Should not match (but it does!) ERROR +// void around(): execution(* D2.m5(..)) && args(List){}//: Should +not match (but it does!) ERROR +// void around(): execution(* D2.m5(..)) && args(ArrayList){}//: +Should not match (it does) ERROR +// void around(): execution(* D2.m5(..)) && args(List){}//: +Should match (it does) +// void around(): execution(* D2.m5(..)) && args(ArrayList){}//: 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!) +// 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){}//: +Should not match (it does not match!) + +// void around(): execution(* C.m6(..)) && args(List){} //: +Should not match (but it does) ERROR +// void around(): execution(* C.m6(..)) && args(ArrayList){}//: +Should not match (but it does!) ERROR +// void around(): execution(* C.m6(..)) && args(List){}//: Should +not match (but it does!) ERROR +// void around(): execution(* C.m6(..)) && args(ArrayList){}//: +Should not match (it does) ERROR +// void around(): execution(* C.m6(..)) && args(List){}//: Should match (it does) +// void around(): execution(* C.m6(..)) && args(ArrayList){}//: 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){}//: +Should not match (it does not match!) + +// void around(): execution(* C.m7(..)) && args(List>){} +//: Should not match (but it does) ERROR +// void around(): execution(* C.m7(..)) && +args(ArrayList>){}//: Should not match (but it does!) ERROR +// void around(): execution(* C.m7(..)) && args(List>){}//: +Should not match (but it does!) ERROR +// void around(): execution(* C.m7(..)) && +args(ArrayList>){}//: Should not match (but it does) ERROR +// void around(): execution(* C.m7(..)) && args(List>){}//: Should not match (but it does) ERROR +// void around(): execution(* C.m7(..)) && args(ArrayList< ? extends +List>){}//: Should not match (but it does!) ERROR +// void around(): execution(* C.m7(..)) && args(List< ? extends List>){}//: Should match (it does!) +// void around(): execution(* C.m7(..)) && args(ArrayList< ? extends +List>){}//: 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>){}//: Should not match (it does not match!) + +// void around(): execution(* C.m8(..)) && args(List){} //: +Should match with unchecked conversion (it does) +// void around(): execution(* C.m8(..)) && args(ArrayList){}//: +Should runtime check with unchecked conversion (it does!) +// void around(): execution(* C.m8(..)) && args(List){}//: Should +match with unchecked conversion (it does!) +// void around(): execution(* C.m8(..)) && args(ArrayList){}//: +Should runtime check with unchecked conversion (it does) +// void around(): execution(* C.m8(..)) && args(List){}//: Should match with unchecked conversion (it does!) +// void around(): execution(* C.m8(..)) && args(ArrayList){}//: 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){}//: +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(Number){}//: Should match +(it does!) +// void around(): execution(* C.m9(..)) && args(Integer){}//: Should +runtime check (it does) +// 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(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!) +} + -- 2.39.5