diff options
author | aclement <aclement> | 2005-08-18 07:51:46 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-08-18 07:51:46 +0000 |
commit | 7951b5c0e225d188310e10f8d1bd91f77dc44465 (patch) | |
tree | 9c2080cf93a72e5a639e1cb876fccf5ad0435211 | |
parent | dea8672c24a4ef917fc37619282b1695de2e843d (diff) | |
download | aspectj-7951b5c0e225d188310e10f8d1bd91f77dc44465.tar.gz aspectj-7951b5c0e225d188310e10f8d1bd91f77dc44465.zip |
some binary weaving ITD tests, they dont pass yet.
-rw-r--r-- | tests/java5/generics/itds/binaryweaving/A1.aj | 13 | ||||
-rw-r--r-- | tests/java5/generics/itds/binaryweaving/A2.aj | 13 | ||||
-rw-r--r-- | tests/java5/generics/itds/binaryweaving/A3.aj | 16 | ||||
-rw-r--r-- | tests/java5/generics/itds/binaryweaving/BaseClass.java | 12 |
4 files changed, 54 insertions, 0 deletions
diff --git a/tests/java5/generics/itds/binaryweaving/A1.aj b/tests/java5/generics/itds/binaryweaving/A1.aj new file mode 100644 index 000000000..005d9dc2d --- /dev/null +++ b/tests/java5/generics/itds/binaryweaving/A1.aj @@ -0,0 +1,13 @@ +import java.util.*; + +aspect A1 { + + public List<String> BaseClass.list1; + + after(BaseClass c): execution(* run1(..)) && this(c) { + List<String> myLs = new ArrayList<String>(); + c.list1 = myLs; + System.err.println("Advice from A1 ran successfully"); + } + +} diff --git a/tests/java5/generics/itds/binaryweaving/A2.aj b/tests/java5/generics/itds/binaryweaving/A2.aj new file mode 100644 index 000000000..20fb8baf5 --- /dev/null +++ b/tests/java5/generics/itds/binaryweaving/A2.aj @@ -0,0 +1,13 @@ +import java.util.*; + +aspect A2 { + + public List<Z> BaseClass<Z>.list2; + + after(): execution(* run2(..)) { + BaseClass<Integer> bInt = new BaseClass<Integer>(); + bInt.list2 = new ArrayList<Integer>(); + System.err.println("Advice from A2 ran successfully"); + } + +} diff --git a/tests/java5/generics/itds/binaryweaving/A3.aj b/tests/java5/generics/itds/binaryweaving/A3.aj new file mode 100644 index 000000000..cacd30e0d --- /dev/null +++ b/tests/java5/generics/itds/binaryweaving/A3.aj @@ -0,0 +1,16 @@ +import java.util.*; + +aspect A3 { + + public List<Z> BaseClass<Z>.m(List<Z> lz) { + return lz; + } + + after(BaseClass c): execution(* run1(..)) && this(c) { + List<String> myLs = new ArrayList<String>(); + BaseClass<String> bStr = new BaseClass<String>(); + List<String> ls2 = bStr.m(myLs); + System.err.println("Advice from A3 ran successfully"); + } + +} diff --git a/tests/java5/generics/itds/binaryweaving/BaseClass.java b/tests/java5/generics/itds/binaryweaving/BaseClass.java new file mode 100644 index 000000000..edd3e4c93 --- /dev/null +++ b/tests/java5/generics/itds/binaryweaving/BaseClass.java @@ -0,0 +1,12 @@ +public class BaseClass<N> { + public static void main(String[]argv) { + BaseClass b = new BaseClass(); + b.run1(); + b.run2(); + b.run3(); + } + + public void run1() {} + public void run2() {} + public void run3() {} +} |