From f1f468907e99cf8fcc0ec9a3dedd467a4f78e1f3 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 31 Jul 2006 14:03:17 +0000 Subject: [PATCH] testcode 152257 --- .../PR152257/base/IOExceptionInjector.aj | 13 +++++++++++++ tests/multiIncremental/PR152257/base/Main.java | 13 +++++++++++++ .../tools/MultiProjectIncrementalTests.java | 16 ++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 tests/multiIncremental/PR152257/base/IOExceptionInjector.aj create mode 100644 tests/multiIncremental/PR152257/base/Main.java diff --git a/tests/multiIncremental/PR152257/base/IOExceptionInjector.aj b/tests/multiIncremental/PR152257/base/IOExceptionInjector.aj new file mode 100644 index 000000000..82f4c5c51 --- /dev/null +++ b/tests/multiIncremental/PR152257/base/IOExceptionInjector.aj @@ -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 index 000000000..fe7a67e00 --- /dev/null +++ b/tests/multiIncremental/PR152257/base/Main.java @@ -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 diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 6459e5a3a..ea2b8e9b2 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -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"); -- 2.39.5