]> source.dussan.org Git - aspectj.git/commitdiff
testcode 152257
authoraclement <aclement>
Mon, 31 Jul 2006 14:03:17 +0000 (14:03 +0000)
committeraclement <aclement>
Mon, 31 Jul 2006 14:03:17 +0000 (14:03 +0000)
tests/multiIncremental/PR152257/base/IOExceptionInjector.aj [new file with mode: 0644]
tests/multiIncremental/PR152257/base/Main.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

diff --git a/tests/multiIncremental/PR152257/base/IOExceptionInjector.aj b/tests/multiIncremental/PR152257/base/IOExceptionInjector.aj
new file mode 100644 (file)
index 0000000..82f4c5c
--- /dev/null
@@ -0,0 +1,13 @@
+// IOExceptionInjector.aj
+package test;
+
+import java.io.IOException;
+
+public aspect IOExceptionInjector {
+        pointcut faultInjection() : call(void methodThatThrows() throws
+IOException);
+
+        void around() throws IOException : faultInjection() {
+                throw new IOException("Exception injected by aspect."); 
+        }
+}
\ No newline at end of file
diff --git a/tests/multiIncremental/PR152257/base/Main.java b/tests/multiIncremental/PR152257/base/Main.java
new file mode 100644 (file)
index 0000000..fe7a67e
--- /dev/null
@@ -0,0 +1,13 @@
+package test;
+
+import java.io.IOException;
+
+public class Main {
+        public void testMethod() throws IOException {
+                methodThatThrows();
+        }
+
+        public static void methodThatThrows() throws IOException {
+                System.out.println("Inside method that may throw an IOException");
+        }
+}
\ No newline at end of file
index 6459e5a3a8c22e42fe698c1f5b5edc7e785f7da4..ea2b8e9b244c68b7c44a4e4c87234959b6a7f1cf 100644 (file)
@@ -819,6 +819,22 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                checkWasFullBuild(); // back to the source
        }
        
+    //Bugzilla Bug 152257 - Incremental compiler doesn't handle exception declaration correctly
+/*     public void testPr152257() {
+               configureNonStandardCompileOptions("-XnoInline");
+               super.VERBOSE=true;
+               initialiseProject("PR152257");
+               build("PR152257");
+               List errors = MyTaskListManager.getErrorMessages();
+               assertTrue("Should be no warnings, but there are #"+errors.size(),errors.size()==0);
+//             checkWasFullBuild();
+               alter("PR152257","inc1");
+               build("PR152257");
+               errors = MyTaskListManager.getErrorMessages();
+               assertTrue("Should be no warnings, but there are #"+errors.size(),errors.size()==0);
+//             checkWasntFullBuild();
+       }
+*/     
 
        public void testPr128655() {
                configureNonStandardCompileOptions("-showWeaveInfo");