From e289da390eb3c1dbc3789d53d0ee19fd5771d4a2 Mon Sep 17 00:00:00 2001 From: wisberg Date: Tue, 27 May 2003 09:30:21 +0000 Subject: [PATCH] tests for devguide script example --- .../ec/int/src/org/smart/persist/Persist.java | 11 +++++++++++ .../ec/module/src/org/smart/app/Util.java | 10 ++++++++++ .../ec/project/src/org/smart/app/Main.java | 12 ++++++++++++ .../ec/project/testsrc/org/smart/app/MainTest.java | 8 ++++++++ 4 files changed, 41 insertions(+) create mode 100644 docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java create mode 100644 docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java create mode 100644 docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java create mode 100644 docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java diff --git a/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java b/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java new file mode 100644 index 000000000..c0073c3ff --- /dev/null +++ b/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java @@ -0,0 +1,11 @@ + +package org.smart.persist; + +aspect Persist { + + after(String string) returning : set(public String *) + && !target(Persist) && args(string) { + String name = thisJoinPoint.getSignature().getName(); + System.out.println("set " + name + " to " + string); + } +} \ No newline at end of file diff --git a/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java b/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java new file mode 100644 index 000000000..19e4a0030 --- /dev/null +++ b/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java @@ -0,0 +1,10 @@ + +package org.smart.app; + +public class Util { + + public static final String utility(String s) { + System.out.println("called Util.utility(\"" + s +"\")"); + return s.toUpperCase(); + } +} \ No newline at end of file diff --git a/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java b/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java new file mode 100644 index 000000000..7ad866ef1 --- /dev/null +++ b/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java @@ -0,0 +1,12 @@ + +package org.smart.app; + +public class Main { + + public String persistMe; + + public static void main(String[] args) { + Main me = new Main(); + me.persistMe = Util.utility("persistMe shouting!"); + } +} \ No newline at end of file diff --git a/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java b/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java new file mode 100644 index 000000000..971e41928 --- /dev/null +++ b/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java @@ -0,0 +1,8 @@ + +package org.smart.app; + +public class MainTest { + public static void main(String[] args) { + Main.main(args); + } +} \ No newline at end of file -- 2.39.5