diff options
author | aclement <aclement> | 2005-04-06 10:21:30 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-06 10:21:30 +0000 |
commit | 883af3699cbeed252af34f8c8586379e5c192f53 (patch) | |
tree | d61524a9ecf009314b77dd233bcc68692b50c168 | |
parent | e460b1e3dae5d05b3457ff96746292516b963c32 (diff) | |
download | aspectj-883af3699cbeed252af34f8c8586379e5c192f53.tar.gz aspectj-883af3699cbeed252af34f8c8586379e5c192f53.zip |
Fix for a test that was relying on previous state lying around on disk from a previous test.
-rw-r--r-- | ajde/testsrc/org/aspectj/ajde/SavedModelConsistencyTest.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/SavedModelConsistencyTest.java b/ajde/testsrc/org/aspectj/ajde/SavedModelConsistencyTest.java index 689381523..6e321c969 100644 --- a/ajde/testsrc/org/aspectj/ajde/SavedModelConsistencyTest.java +++ b/ajde/testsrc/org/aspectj/ajde/SavedModelConsistencyTest.java @@ -18,6 +18,7 @@ import java.io.File; import java.util.ArrayList; import java.util.List; +import org.aspectj.asm.AsmManager; import org.aspectj.asm.HierarchyWalker; import org.aspectj.asm.IHierarchy; import org.aspectj.asm.IProgramElement; @@ -49,12 +50,10 @@ public class SavedModelConsistencyTest extends AjdeTestCase { assertTrue(testFile.exists()); IProgramElement nodePreBuild = model.findElementForSourceLine(testFile.getAbsolutePath(), 5); - //System.err.println(nodePreBuild.getKind()); - + doSynchronousBuild(CONFIG_FILE_PATH); - + IProgramElement nodePostBuild = model.findElementForSourceLine(testFile.getAbsolutePath(), 5); - //System.err.println(nodePostBuild.getKind()); assertTrue("Nodes should be identical: Prebuild kind = "+nodePreBuild.getKind()+ " Postbuild kind = "+nodePostBuild.getKind(),nodePreBuild.getKind().equals(nodePostBuild.getKind())); @@ -95,6 +94,14 @@ public class SavedModelConsistencyTest extends AjdeTestCase { protected void setUp() throws Exception { super.setUp("examples"); + // In order to get a model on the disk to read in, do a build with the right flag set ! + try { + AsmManager.dumpModelPostBuild=true; + doSynchronousBuild(CONFIG_FILE_PATH); + } finally { + AsmManager.dumpModelPostBuild=false; + } + } protected void tearDown() throws Exception { |