]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 124399
authoraclement <aclement>
Tue, 24 Jan 2006 09:59:17 +0000 (09:59 +0000)
committeraclement <aclement>
Tue, 24 Jan 2006 09:59:17 +0000 (09:59 +0000)
tests/multiIncremental/PR124399/base/edu/ucsd/aosd/MyApplication.aj [new file with mode: 0644]
tests/multiIncremental/PR124399/inc1/edu/ucsd/aosd/MyApplication.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/PR124399/base/edu/ucsd/aosd/MyApplication.aj b/tests/multiIncremental/PR124399/base/edu/ucsd/aosd/MyApplication.aj
new file mode 100644 (file)
index 0000000..0ee8a86
--- /dev/null
@@ -0,0 +1,27 @@
+package edu.ucsd.aosd;
+
+import java.io.PrintStream;
+
+public class MyApplication
+{
+    // main
+    public static void main(String[] args) {
+        for (String arg : args) {
+            System.out.println("got: " + arg);
+//            System.out.printf("got: %s\n", arg);
+        }
+    }
+}
+
+aspect Printing {
+    pointcut printlnCalls(PrintStream ps, String out):
+        call(* PrintStream+.println(String)) && target(ps) && args(out);
+    Object around(PrintStream ps, String out):
+        printlnCalls(ps, out) && !adviceexecution() {
+        return proceed(ps, out);
+    }
+
+//    pointcut printfCalls(PrintStream ps, String fmt, Object[] objs):
+//        call(* PrintStream+.printf(String, Object...#####))
+//        && target(ps) && args(fmt, objs);
+}
diff --git a/tests/multiIncremental/PR124399/inc1/edu/ucsd/aosd/MyApplication.aj b/tests/multiIncremental/PR124399/inc1/edu/ucsd/aosd/MyApplication.aj
new file mode 100644 (file)
index 0000000..32aa992
--- /dev/null
@@ -0,0 +1,27 @@
+package edu.ucsd.aosd;
+
+import java.io.PrintStream;
+
+public class MyApplication
+{
+    // main
+    public static void main(String[] args) {
+        for (String arg : args) {
+            System.out.println("got: " + arg);
+            System.out.printf("got: %s\n", arg);
+        }
+    }
+}
+
+aspect Printing {
+    pointcut printlnCalls(PrintStream ps, String out):
+        call(* PrintStream+.println(String)) && target(ps) && args(out);
+    Object around(PrintStream ps, String out):
+        printlnCalls(ps, out) && !adviceexecution() {
+        return proceed(ps, out);
+    }
+
+    pointcut printfCalls(PrintStream ps, String fmt, Object[] objs):
+        call(* PrintStream+.printf(String, Object...))
+        && target(ps) && args(fmt, objs);
+}
index ca4dc81b0362b59a189bbe393c1dea3174738798..a17a57a8def41ca5b635fc4cdf58764eeacdfd5a 100644 (file)
@@ -365,6 +365,18 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed {
                checkWasntFullBuild();
        }
        
+
+//     public void testPr124399() {
+//             AjdeInteractionTestbed.VERBOSE=true;
+//             configureBuildStructureModel(true);
+//             initialiseProject("PR124399");
+//             build("PR124399");
+//             checkWasFullBuild();
+//             alter("PR124399","inc1");
+//             build("PR124399");
+//             checkWasntFullBuild();
+//     }
+       
        public void testPr121384() {
 //             AjdeInteractionTestbed.VERBOSE=true;
 //             AsmManager.setReporting("c:/foo.txt",true,true,true,false);