From f6d0013eb2cddf9946ab07d0a4e129cc9c0869bb Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Mon, 21 Jan 2019 09:47:07 -0800 Subject: 389678: overweaving test resources --- tests/bugs193/389678/OverWeave_1/src/Application.java | 9 +++++++++ tests/bugs193/389678/OverWeave_1/src/MyAspect.aj | 5 +++++ tests/bugs193/389678/OverWeave_2/src/MyAspect2.aj | 5 +++++ tests/bugs193/389678/OverWeave_4/src/MyAspect3.aj | 5 +++++ tests/bugs193/389678/ow1.jar | Bin 0 -> 2828 bytes tests/bugs193/389678/ow2.jar | Bin 0 -> 1630 bytes tests/bugs193/389678/ow4.jar | Bin 0 -> 1630 bytes tests/bugs193/389678/run.sh | 10 ++++++++++ tests/bugs193/389678/runow.sh | 4 ++++ 9 files changed, 38 insertions(+) create mode 100644 tests/bugs193/389678/OverWeave_1/src/Application.java create mode 100644 tests/bugs193/389678/OverWeave_1/src/MyAspect.aj create mode 100644 tests/bugs193/389678/OverWeave_2/src/MyAspect2.aj create mode 100644 tests/bugs193/389678/OverWeave_4/src/MyAspect3.aj create mode 100644 tests/bugs193/389678/ow1.jar create mode 100644 tests/bugs193/389678/ow2.jar create mode 100644 tests/bugs193/389678/ow4.jar create mode 100755 tests/bugs193/389678/run.sh create mode 100755 tests/bugs193/389678/runow.sh (limited to 'tests/bugs193') diff --git a/tests/bugs193/389678/OverWeave_1/src/Application.java b/tests/bugs193/389678/OverWeave_1/src/Application.java new file mode 100644 index 000000000..1d98f01e7 --- /dev/null +++ b/tests/bugs193/389678/OverWeave_1/src/Application.java @@ -0,0 +1,9 @@ +public class Application { + public static void main(String[] args) { + sayHelloTo("world"); + } + + public static void sayHelloTo(String subject) { + System.out.println("Hello " + subject + "!"); + } +} diff --git a/tests/bugs193/389678/OverWeave_1/src/MyAspect.aj b/tests/bugs193/389678/OverWeave_1/src/MyAspect.aj new file mode 100644 index 000000000..cb9d42081 --- /dev/null +++ b/tests/bugs193/389678/OverWeave_1/src/MyAspect.aj @@ -0,0 +1,5 @@ +public aspect MyAspect { + before() : execution(* Application.*(..)) { + System.out.println(this.getClass().getName() + " -> " + thisJoinPointStaticPart); + } +} diff --git a/tests/bugs193/389678/OverWeave_2/src/MyAspect2.aj b/tests/bugs193/389678/OverWeave_2/src/MyAspect2.aj new file mode 100644 index 000000000..b59a2464f --- /dev/null +++ b/tests/bugs193/389678/OverWeave_2/src/MyAspect2.aj @@ -0,0 +1,5 @@ +public aspect MyAspect2 { + before() : execution(* *(..)) { + System.out.println(this.getClass().getName() + " -> " + thisJoinPointStaticPart); + } +} diff --git a/tests/bugs193/389678/OverWeave_4/src/MyAspect3.aj b/tests/bugs193/389678/OverWeave_4/src/MyAspect3.aj new file mode 100644 index 000000000..2c40e42c6 --- /dev/null +++ b/tests/bugs193/389678/OverWeave_4/src/MyAspect3.aj @@ -0,0 +1,5 @@ +public aspect MyAspect3 { + before() : execution(* *(..)) { + System.out.println(this.getClass().getName() + " -> " + thisJoinPointStaticPart); + } +} diff --git a/tests/bugs193/389678/ow1.jar b/tests/bugs193/389678/ow1.jar new file mode 100644 index 000000000..acb5cc6d4 Binary files /dev/null and b/tests/bugs193/389678/ow1.jar differ diff --git a/tests/bugs193/389678/ow2.jar b/tests/bugs193/389678/ow2.jar new file mode 100644 index 000000000..b04346f1e Binary files /dev/null and b/tests/bugs193/389678/ow2.jar differ diff --git a/tests/bugs193/389678/ow4.jar b/tests/bugs193/389678/ow4.jar new file mode 100644 index 000000000..85f5a057f Binary files /dev/null and b/tests/bugs193/389678/ow4.jar differ diff --git a/tests/bugs193/389678/run.sh b/tests/bugs193/389678/run.sh new file mode 100755 index 000000000..883bc7aa2 --- /dev/null +++ b/tests/bugs193/389678/run.sh @@ -0,0 +1,10 @@ +echo "ow1" +ajc -1.8 -sourceroots OverWeave_1/src -outjar ow1.jar -showWeaveInfo +echo "ow2" +ajc -1.8 -sourceroots OverWeave_2/src -outjar ow2.jar -showWeaveInfo +echo "ow4 build" +ajc -1.8 -sourceroots OverWeave_4/src -outjar ow4.jar -showWeaveInfo +echo "ow3" +ajc -1.8 -d out -inpath ow1.jar -aspectpath ow2.jar -showWeaveInfo -sourceroots OverWeave_3/src -outjar ow3.jar + +java -classpath out:/Users/aclement/installs/aspectj192/lib/aspectjrt.jar:ow2.jar Application diff --git a/tests/bugs193/389678/runow.sh b/tests/bugs193/389678/runow.sh new file mode 100755 index 000000000..c2ca8d3b1 --- /dev/null +++ b/tests/bugs193/389678/runow.sh @@ -0,0 +1,4 @@ +ajc -1.8 -sourceroots OverWeave_1/src -outjar ow1.jar +ajc -1.8 -sourceroots OverWeave_2/src -outjar ow2.jar +ajc -1.8 -Xset:overWeaving=true -d out -inpath ow1.jar -aspectpath ow2.jar -sourceroots OverWeave_3/src +java -classpath out:/Users/aclement/installs/aspectj192/lib/aspectjrt.jar:ow2.jar Application -- cgit v1.2.3