]> source.dussan.org Git - aspectj.git/commitdiff
318884: incremental: classes
authoraclement <aclement>
Tue, 6 Jul 2010 19:16:35 +0000 (19:16 +0000)
committeraclement <aclement>
Tue, 6 Jul 2010 19:16:35 +0000 (19:16 +0000)
tests/multiIncremental/pr318884_10/base/src/A.java [new file with mode: 0644]
tests/multiIncremental/pr318884_10/base/src/B.java [new file with mode: 0644]
tests/multiIncremental/pr318884_10/inc1/src/B.java [new file with mode: 0644]
tests/multiIncremental/pr318884_9/base/src/A.java [new file with mode: 0644]
tests/multiIncremental/pr318884_9/base/src/B.java [new file with mode: 0644]
tests/multiIncremental/pr318884_9/inc1/src/B.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.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 (file)
index 0000000..7b84715
--- /dev/null
@@ -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 (file)
index 0000000..66dd24c
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/tests/multiIncremental/pr318884_9/base/src/A.java b/tests/multiIncremental/pr318884_9/base/src/A.java
new file mode 100644 (file)
index 0000000..0abc487
--- /dev/null
@@ -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 (file)
index 0000000..09db9d7
--- /dev/null
@@ -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 (file)
index 0000000..ca74639
--- /dev/null
@@ -0,0 +1,4 @@
+public class B {
+  public static class C {
+  }
+}
index 5c33c36c50492cb6e2f75f66643e5bea3f0138cb..a89b78c9eb51b6be550a68c8cd7c39d696f2effc 100644 (file)
@@ -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));
+       }
 }