diff options
author | aclement <aclement> | 2010-07-06 19:16:35 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-07-06 19:16:35 +0000 |
commit | ef26771ec1468be1314d0d1a9397e3a69661e294 (patch) | |
tree | 3b1827789bdadb080c5be33f258d8ee8f7fe6740 /tests | |
parent | d75bd040745be26d5557c378be64696e97e680fa (diff) | |
download | aspectj-ef26771ec1468be1314d0d1a9397e3a69661e294.tar.gz aspectj-ef26771ec1468be1314d0d1a9397e3a69661e294.zip |
318884: incremental: classes
Diffstat (limited to 'tests')
7 files changed, 36 insertions, 2 deletions
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 --- /dev/null +++ b/tests/multiIncremental/pr318884_10/inc1/src/B.java 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)); + } } |