From ef26771ec1468be1314d0d1a9397e3a69661e294 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 6 Jul 2010 19:16:35 +0000 Subject: [PATCH] 318884: incremental: classes --- .../pr318884_10/base/src/A.java | 3 +++ .../pr318884_10/base/src/B.java | 2 ++ .../pr318884_10/inc1/src/B.java | 0 .../pr318884_9/base/src/A.java | 5 +++++ .../pr318884_9/base/src/B.java | 5 +++++ .../pr318884_9/inc1/src/B.java | 4 ++++ .../tools/IncrementalCompilationTests.java | 19 +++++++++++++++++-- 7 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tests/multiIncremental/pr318884_10/base/src/A.java create mode 100644 tests/multiIncremental/pr318884_10/base/src/B.java create mode 100644 tests/multiIncremental/pr318884_10/inc1/src/B.java create mode 100644 tests/multiIncremental/pr318884_9/base/src/A.java create mode 100644 tests/multiIncremental/pr318884_9/base/src/B.java create mode 100644 tests/multiIncremental/pr318884_9/inc1/src/B.java diff --git a/tests/multiIncremental/pr318884_10/base/src/A.java b/tests/multiIncremental/pr318884_10/base/src/A.java new file mode 100644 index 000000000..7b8471540 --- /dev/null +++ b/tests/multiIncremental/pr318884_10/base/src/A.java @@ -0,0 +1,3 @@ +public class A { + B b = new B(); +} diff --git a/tests/multiIncremental/pr318884_10/base/src/B.java b/tests/multiIncremental/pr318884_10/base/src/B.java new file mode 100644 index 000000000..66dd24ce6 --- /dev/null +++ b/tests/multiIncremental/pr318884_10/base/src/B.java @@ -0,0 +1,2 @@ +public class B { +} diff --git a/tests/multiIncremental/pr318884_10/inc1/src/B.java b/tests/multiIncremental/pr318884_10/inc1/src/B.java new file mode 100644 index 000000000..e69de29bb diff --git a/tests/multiIncremental/pr318884_9/base/src/A.java b/tests/multiIncremental/pr318884_9/base/src/A.java new file mode 100644 index 000000000..0abc4874a --- /dev/null +++ b/tests/multiIncremental/pr318884_9/base/src/A.java @@ -0,0 +1,5 @@ +public class A { + public static void main(String []argv) { + new B.C("abc"); + } +} diff --git a/tests/multiIncremental/pr318884_9/base/src/B.java b/tests/multiIncremental/pr318884_9/base/src/B.java new file mode 100644 index 000000000..09db9d7c0 --- /dev/null +++ b/tests/multiIncremental/pr318884_9/base/src/B.java @@ -0,0 +1,5 @@ +public class B { + public static class C { + public C(String s) {} + } +} diff --git a/tests/multiIncremental/pr318884_9/inc1/src/B.java b/tests/multiIncremental/pr318884_9/inc1/src/B.java new file mode 100644 index 000000000..ca746393f --- /dev/null +++ b/tests/multiIncremental/pr318884_9/inc1/src/B.java @@ -0,0 +1,4 @@ +public class B { + public static class C { + } +} diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java index 5c33c36c5..a89b78c9e 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java @@ -125,8 +125,8 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental } // removing constructor from a static inner class - public void testInnerClassChanges_318884_8() throws Exception { - String p = "pr318884_8"; + public void testInnerClassChanges_318884_9() throws Exception { + String p = "pr318884_9"; initialiseProject(p); build(p); checkWasFullBuild(); @@ -137,4 +137,19 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental assertEquals(1, getErrorMessages(p).size()); assertContains("The constructor B.C(String) is undefined", getErrorMessages(p).get(0)); } + + // removing class + public void testInnerClassChanges_318884_10() throws Exception { + AjdeInteractionTestbed.VERBOSE = true; + String p = "pr318884_10"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + checkCompileWeaveCount(p, 2, 2); + alter(p, "inc1"); + build(p); + checkWasntFullBuild(); + assertEquals(2, getErrorMessages(p).size()); + assertContains("B cannot be resolved to a type", getErrorMessages(p).get(0)); + } } -- 2.39.5