summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authoraclement <aclement>2008-03-06 21:03:25 +0000
committeraclement <aclement>2008-03-06 21:03:25 +0000
commit7a989e83a72b50a48a588cd6751d5b2dd499e827 (patch)
tree8ba3b6ed66b4e5b5aef1409a77f2e6a54ad42d02 /tests/src
parentd46d53b69a261fb79cda4bd08d6b8559d1525036 (diff)
downloadaspectj-7a989e83a72b50a48a588cd6751d5b2dd499e827.tar.gz
aspectj-7a989e83a72b50a48a588cd6751d5b2dd499e827.zip
221427 testcode: commented out
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index c7ab04091..9931eced0 100644
--- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -969,6 +969,64 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
// aspect hasn't changed
}
+ // Case001: renaming a private field in a type
+/* public void testPrReducingDependentBuilds_001_221427() {
+ AjdeInteractionTestbed.VERBOSE=true;
+ IncrementalStateManager.debugIncrementalStates=true;
+ initialiseProject("P221427_1");
+ initialiseProject("P221427_2");
+ configureNewProjectDependency("P221427_2","P221427_1");
+
+ build("P221427_1");
+ build("P221427_2");
+ alter("P221427_1","inc1"); // rename private class in super project
+ MyStateListener.reset();
+ build("P221427_1");
+ build("P221427_2");
+
+ AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P221427_1","bin")));
+ assertTrue("There should be state for project P221427_1",ajs!=null);
+ //System.out.println(MyStateListener.getInstance().getDecisions());
+ checkWasntFullBuild();
+ assertTrue("Should be one structural change but there were "+
+ ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
+ ajs.getNumberOfStructuralChangesSinceLastFullBuild()==1);
+
+ }
+
+ // Case002: changing a class to final that is extended in a dependent project
+ public void testPrReducingDependentBuilds_002_221427() {
+ AjdeInteractionTestbed.VERBOSE=true;
+ IncrementalStateManager.debugIncrementalStates=true;
+ initialiseProject("P221427_3");
+ initialiseProject("P221427_4");
+ configureNewProjectDependency("P221427_4","P221427_3");
+
+ build("P221427_3");
+ build("P221427_4"); // build OK, type in super project is non-final
+ alter("P221427_3","inc1"); // change class declaration in super-project to final
+ MyStateListener.reset();
+ build("P221427_3");
+ build("P221427_4"); // build FAIL, type in super project is now final
+
+ AjState ajs = IncrementalStateManager.findStateManagingOutputLocation(new File(getFile("P221427_3","bin")));
+ assertTrue("There should be state for project P221427_3",ajs!=null);
+ System.out.println(MyStateListener.getInstance().getDecisions());
+
+ List errors = getErrorMessages("P221427_4");
+ if (errors.size()!=1) {
+ if (errors.size()==0) fail("Expected error about not being able to extend final class");
+ for (Iterator iterator = errors.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ System.out.println(object);
+ }
+ fail("Expected 1 error but got "+errors.size());
+ }
+// assertTrue("Shouldn't be one structural change but there were "+
+// ajs.getNumberOfStructuralChangesSinceLastFullBuild(),
+// ajs.getNumberOfStructuralChangesSinceLastFullBuild()==1);
+
+ }*/
// test for comment #6 - simulates AJDT core builder test testBug99133a -
// changing the contents of a method within a class shouldn't force a
// full build of a dependant project. To force this to behave like AJDT