summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-04-15 14:06:41 +0000
committeraclement <aclement>2005-04-15 14:06:41 +0000
commit45f1f040588862f0100f3844574f3a80afab8e15 (patch)
tree52ecd5067f8ae4bf037b60622bd1e3e93dbb55b3
parentdf7fff4c8c073a3bbcfe749134d577299402d5fb (diff)
downloadaspectj-45f1f040588862f0100f3844574f3a80afab8e15.tar.gz
aspectj-45f1f040588862f0100f3844574f3a80afab8e15.zip
Andys quest to reduce unnecessary test output.
-rw-r--r--ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java16
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ExtensionTests.java8
-rw-r--r--ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java3
-rw-r--r--ajde/testsrc/org/aspectj/ajde/NullIdeUIAdapter.java4
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java50
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java29
6 files changed, 59 insertions, 51 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
index 5be0b05e1..93e2a5a34 100644
--- a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
@@ -53,6 +53,7 @@ public class BuildCancellingTest extends AjdeTestCase {
private CompilerAdapter compilerAdapter;
public static final String PROJECT_DIR = "BuildCancelling";
public static final String binDir = "bin";
+ private static final boolean debugTests = false;
public BuildCancellingTest(String arg0) {
super(arg0);
@@ -71,7 +72,7 @@ public class BuildCancellingTest extends AjdeTestCase {
* message about cancelling the compile and their should be nothing on the disk.
*/
public void testCancelFirstCompile() {
- System.out.println("\n\n\ntestCancelFirstCompile: Building with LoadsaCode.lst");
+ if (debugTests) System.out.println("\n\n\ntestCancelFirstCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
@@ -102,7 +103,7 @@ public class BuildCancellingTest extends AjdeTestCase {
* message about cancelling the compile and their should be nothing on the disk.
*/
public void testCancelThirdCompile() {
- System.out.println("\n\n\ntestCancelThirdCompile: Building with LoadsaCode.lst");
+ if (debugTests) System.out.println("\n\n\ntestCancelThirdCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
@@ -132,7 +133,7 @@ public class BuildCancellingTest extends AjdeTestCase {
* message about cancelling the weave and their should be nothing on the disk.
*/
public void testCancelFirstAspectWeave() {
- System.out.println("\n\n\ntestCancelFirstAspectWeave: Building with LoadsaCode.lst");
+ if (debugTests) System.out.println("\n\n\ntestCancelFirstAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
@@ -160,7 +161,7 @@ public class BuildCancellingTest extends AjdeTestCase {
* message about cancelling the weave and their should be nothing on the disk.
*/
public void testCancelThirdAspectWeave() {
- System.out.println("\n\n\ntestCancelThirdAspectWeave: Building with LoadsaCode.lst");
+ if (debugTests) System.out.println("\n\n\ntestCancelThirdAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
@@ -204,7 +205,7 @@ public class BuildCancellingTest extends AjdeTestCase {
*
*/
public void testCancelFirstClassWeave() {
- System.out.println("testCancelFirstClassWeave: Building with EvenMoreCode.lst");
+ if (debugTests) System.out.println("testCancelFirstClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
@@ -245,7 +246,7 @@ public class BuildCancellingTest extends AjdeTestCase {
*
*/
public void testCancelSecondClassWeave() {
- System.out.println("testCancelSecondClassWeave: Building with EvenMoreCode.lst");
+ if (debugTests) System.out.println("testCancelSecondClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
@@ -304,7 +305,7 @@ public class BuildCancellingTest extends AjdeTestCase {
&& text.indexOf(programmableString) != -1) {
count--;
if (count==0) {
- System.out.println("Just got message '"+newText+"' - asking build to cancel");
+ if (debugTests) System.out.println("Just got message '"+newText+"' - asking build to cancel");
compilerAdapter.requestCompileExit();
programmableString = null;
}
@@ -399,6 +400,7 @@ public class BuildCancellingTest extends AjdeTestCase {
}
private void dumpTaskData() {
+ if (!debugTests) return;
List ll = ideManager.getCompilationSourceLineTasks();
for (Iterator iter = ll.iterator(); iter.hasNext();) {
Object element = (Object) iter.next();
diff --git a/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java b/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java
index c2a8f2670..a80f4a95e 100644
--- a/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java
+++ b/ajde/testsrc/org/aspectj/ajde/ExtensionTests.java
@@ -30,7 +30,7 @@ import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
public class ExtensionTests extends AjcTestCase {
public static final String PROJECT_DIR = "extensions";
-
+ private static final boolean debugTests = false;
private File baseDir;
protected void setUp() throws Exception {
@@ -59,7 +59,7 @@ public class ExtensionTests extends AjcTestCase {
CompilationResult result = ajc(baseDir,args);
List l = result.getWarningMessages();
Properties p = AsmManager.ModelInfo.summarizeModel().getProperties();
- System.out.println("Structure Model for InnerClasses.java:");
+ if (debugTests) System.out.println("Structure Model for InnerClasses.java:");
walkit(AsmManager.getDefault().getHierarchy().getRoot(),0);
foundNode = null;
findChild("main",AsmManager.getDefault().getHierarchy().getRoot());
@@ -115,8 +115,8 @@ public class ExtensionTests extends AjcTestCase {
public void walkit(IProgramElement ipe,int indent) {
if (ipe!=null) {
- for (int i = 0 ;i<indent;i++) System.out.print(" ");
- System.out.println(ipe.toLabelString());//getName());
+ if (debugTests) for (int i = 0 ;i<indent;i++) System.out.print(" ");
+ if (debugTests) System.out.println(ipe.toLabelString());//getName());
if (ipe.getChildren()!=null) {
List kids = ipe.getChildren();
for (Iterator iter = kids.iterator(); iter.hasNext();) {
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java
index 199a763c3..e16860b39 100644
--- a/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java
+++ b/ajde/testsrc/org/aspectj/ajde/NullIdeTaskListManager.java
@@ -27,6 +27,7 @@ public class NullIdeTaskListManager implements TaskListManager {
List sourceLineTasks = new ArrayList();
boolean hasWarning = false;
+ private static boolean debugTests = false;
public void addSourcelineTask(
String message,
@@ -37,6 +38,7 @@ public class NullIdeTaskListManager implements TaskListManager {
hasWarning = true;
}
}
+
public void addSourcelineTask(IMessage message) {
sourceLineTasks.add(new SourceLineTask(message));
@@ -44,6 +46,7 @@ public class NullIdeTaskListManager implements TaskListManager {
hasWarning = true;
}
/* Guard against null source locations e.g. JAR file messages */
+ if (!debugTests) return;
if (null != message.getSourceLocation()) {
System.out.println("NullIde> task: " + message.getMessage() + ", file: " + message.getSourceLocation().getSourceFile().getAbsolutePath()
+ ": " + message.getSourceLocation().getLine());
diff --git a/ajde/testsrc/org/aspectj/ajde/NullIdeUIAdapter.java b/ajde/testsrc/org/aspectj/ajde/NullIdeUIAdapter.java
index 5d344e754..17661fb42 100644
--- a/ajde/testsrc/org/aspectj/ajde/NullIdeUIAdapter.java
+++ b/ajde/testsrc/org/aspectj/ajde/NullIdeUIAdapter.java
@@ -16,9 +16,9 @@ package org.aspectj.ajde;
import org.aspectj.ajde.ui.*;
public class NullIdeUIAdapter implements IdeUIAdapter {
-
+ private final static boolean debugTests = false;
public void displayStatusInformation(String message) {
- System.out.println("NullIde>" + message);
+ if (debugTests) System.out.println("NullIde>" + message);
}
public void resetGUI() {
diff --git a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
index fd0ef0c73..f678afae6 100644
--- a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
@@ -25,6 +25,8 @@ public class ReweavableTestCase extends AjdeTestCase {
private CompilerAdapter compilerAdapter;
public static final String PROJECT_DIR = "ReweavableTest";
+
+ private static final boolean debugTests = false;
public static final String binDir = "bin";
@@ -73,7 +75,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* should not report it is running in reweavable mode.
*/
public void testNonReweavableCompile() {
- System.out.println("testNonReweavableCompile: Building with NonReweavable1.lst");
+ if (debugTests) System.out.println("testNonReweavableCompile: Building with NonReweavable1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("NonReweavable1.lst").getAbsolutePath(),new BPM(),false);
@@ -85,9 +87,9 @@ public class ReweavableTestCase extends AjdeTestCase {
File fLog = openFile("bin/Logger.class");
assertTrue("bin/CalculatePI.class should exist?!?",fCalc.exists());
assertTrue("bin/Logger.class should exist?!?",fLog.exists());
- System.out.println("CalculatePI.class is of size: "+fCalc.length());
- System.out.println("Logger.class is of size: "+fLog.length());
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("CalculatePI.class is of size: "+fCalc.length());
+ if (debugTests) System.out.println("Logger.class is of size: "+fLog.length());
+ if (debugTests) System.out.println("\n\n\n");
nonreweavesize_CalculatePI = (int)fCalc.length();
nonreweavesize_Logger = (int)fLog.length();
}
@@ -111,7 +113,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* should be larger than those created during the last test.
*/
public void testReweavableCompile() {
- System.out.println("testReweavableCompile: Building with Reweavable1.lst");
+ if (debugTests) System.out.println("testReweavableCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
@@ -123,8 +125,8 @@ public class ReweavableTestCase extends AjdeTestCase {
File fLog = openFile("bin/Logger.class");
assertTrue("bin/CalculatePI.class should exist?!?",fCalc.exists());
assertTrue("bin/Logger.class should exist?!?",fLog.exists());
- System.out.println("CalculatePI.class is of size: "+fCalc.length());
- System.out.println("Logger.class is of size: "+fLog.length());
+ if (debugTests) System.out.println("CalculatePI.class is of size: "+fCalc.length());
+ if (debugTests) System.out.println("Logger.class is of size: "+fLog.length());
// Temporarily remove these tests - it seems the order in which the testXXX methods are run cannot be relied upon
// so reweavablesize_XXX fields might not have been set yet.
// assertTrue("Reweavable version should be larger than non-reweavable version of CalculatePI",
@@ -135,7 +137,7 @@ public class ReweavableTestCase extends AjdeTestCase {
reweavablesize_CalculatePI = (int)fCalc.length();
reweavablesize_Logger = (int)fLog.length();
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
@@ -158,7 +160,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* compression) versions.
*/
public void testReweavableCompressCompile() {
- System.out.println("testReweavableCompressCompile: Building with ReweavableCompress1.lst");
+ if (debugTests) System.out.println("testReweavableCompressCompile: Building with ReweavableCompress1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("ReweavableCompress1.lst").getAbsolutePath(),new BPM(),false);
@@ -172,8 +174,8 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("bin/Logger.class should exist?!?",fLog.exists());
int calclen = (int)fCalc.length();
int loglen = (int)fLog.length();
- System.out.println("CalculatePI.class is of size: "+calclen);
- System.out.println("Logger.class is of size: "+loglen);
+ if (debugTests) System.out.println("CalculatePI.class is of size: "+calclen);
+ if (debugTests) System.out.println("Logger.class is of size: "+loglen);
// Temporarily remove these tests - it seems the order in which the testXXX methods are run cannot be relied upon
// so reweavablesize_XXX fields might not have been set yet.
// assertTrue("Reweavable version should be larger than non-reweavable version of CalculatePI",
@@ -189,7 +191,7 @@ public class ReweavableTestCase extends AjdeTestCase {
// " Compressed version:"+loglen+"bytes Non-compressed version:"+reweavablesize_Logger+"bytes",
// loglen<reweavablesize_Logger);
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
@@ -218,7 +220,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* Expected result = Both compiles will succeed.
*/
public void testReweavableSimpleCompile() {
- System.out.println("testReweavableSimpleCompile: Building with Reweavable1.lst");
+ if (debugTests) System.out.println("testReweavableSimpleCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
@@ -227,7 +229,7 @@ public class ReweavableTestCase extends AjdeTestCase {
checkFor("weaver operating in reweavable mode"));
- System.out.println("\ntestReweavableSimpleCompile: Building with Reweavable2.lst");
+ if (debugTests) System.out.println("\ntestReweavableSimpleCompile: Building with Reweavable2.lst");
Set paths = new HashSet();
paths.add(openFile(binDir));
ideManager.getProjectProperties().setInpath(paths);
@@ -245,7 +247,7 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("bin/Logger.class should exist?!?",fLog.exists());
assertTrue("bin/SecondAspect.class should exist?!?",fSec.exists());
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
@@ -272,7 +274,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* Expected result = Second compile will fail - reporting that Logger is missing (it 'touched' in the first compile CalculatePI)
*/
public void testForReweavableSimpleErrorCompile() {
- System.out.println("testForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
+ if (debugTests) System.out.println("testForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
@@ -284,7 +286,7 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("Could not delete bin/Logger.class??",openFile("bin/Logger.class").delete());
- System.out.println("\ntestForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
+ if (debugTests) System.out.println("\ntestForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
Set paths = new HashSet();
paths.add(openFile(binDir));
ideManager.getProjectProperties().setInpath(paths);
@@ -302,7 +304,7 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("bin/Logger.class should not exist!",!fLog.exists());
assertTrue("bin/SecondAspect.class should not exist!",fSec.exists());
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
@@ -328,7 +330,7 @@ public class ReweavableTestCase extends AjdeTestCase {
* Expected result = Second compile will fail - reporting that tjp.GetInfo is missing (it 'touched' in the first compile tjp.Demo)
*/
public void testErrorScenario2Compile() {
- System.out.println("testErrorScenario2: Building with TJP1.lst");
+ if (debugTests) System.out.println("testErrorScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
@@ -340,7 +342,7 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("Could not delete bin/tjp/GetInfo.class??",openFile("bin/tjp/GetInfo.class").delete());
- System.out.println("\ntestErrorScenario2: Building with TJP2.lst");
+ if (debugTests) System.out.println("\ntestErrorScenario2: Building with TJP2.lst");
Set paths = new HashSet();
paths.add(openFile(binDir));
ideManager.getProjectProperties().setInpath(paths);
@@ -356,11 +358,11 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("bin/tjp/Demo.class should exist!",fDemo.exists());
assertTrue("bin/tjp/GetInfo.class should not exist!",!fGetInfo.exists());
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
public void testWorkingScenario2Compile() {
- System.out.println("testWorkingScenario2: Building with TJP1.lst");
+ if (debugTests) System.out.println("testWorkingScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
@@ -369,7 +371,7 @@ public class ReweavableTestCase extends AjdeTestCase {
checkFor("weaver operating in reweavable mode"));
- System.out.println("\ntestWorkingScenario2: Building with TJP2.lst");
+ if (debugTests) System.out.println("\ntestWorkingScenario2: Building with TJP2.lst");
Set paths = new HashSet();
paths.add(openFile(binDir));
ideManager.getProjectProperties().setInpath(paths);
@@ -385,7 +387,7 @@ public class ReweavableTestCase extends AjdeTestCase {
assertTrue("bin/tjp/GetInfo.class should exist!",fGetInfo.exists());
assertTrue("bin/tjp/Demo.class should not exist!",fDemo.exists());
- System.out.println("\n\n\n");
+ if (debugTests) System.out.println("\n\n\n");
}
diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
index 306f89749..e8da5e1ad 100644
--- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
@@ -61,6 +61,7 @@ import org.aspectj.util.FileUtil;
public class ShowWeaveMessagesTestCase extends AjdeTestCase {
private static boolean regenerate;
+ private static boolean debugTests = false;
static {
// Switch this to true for a single iteration if you want to reconstruct the
@@ -101,7 +102,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave all the possible kinds of advice and verify the messages that come out.
*/
public void testWeaveMessagesAdvice() {
- System.out.println("testWeaveMessagesAdvice: Building with One.lst");
+ if (debugTests) System.out.println("testWeaveMessagesAdvice: Building with One.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("One.lst").getAbsolutePath(),new BPM(),false);
@@ -115,7 +116,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave field and method ITDs and check the weave messages that come out.
*/
public void testWeaveMessagesITD() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesITD: Building with Two.lst");
+ if (debugTests) System.out.println("\ntestWeaveMessagesITD: Building with Two.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Two.lst").getAbsolutePath(),new BPM(),false);
@@ -127,7 +128,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave "declare parents: implements" and check the weave messages that come out.
*/
public void testWeaveMessagesDeclare() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesDeclare: Building with Three.lst");
+ if (debugTests) System.out.println("\ntestWeaveMessagesDeclare: Building with Three.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Three.lst").getAbsolutePath(),new BPM(),false);
@@ -139,7 +140,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Can't do equivalent binary test - as can't do extends in binary.
*/
public void testWeaveMessagesDeclareExtends() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesDeclareExtends: Building with Four.lst");
+ if (debugTests) System.out.println("\ntestWeaveMessagesDeclareExtends: Building with Four.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Four.lst").getAbsolutePath(),new BPM(),false);
@@ -150,7 +151,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave "declare soft: type: pointcut" and check the weave messages that come out.
*/
public void testWeaveMessagesDeclareSoft() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesDeclareSoft: Building with Five.lst");
+ if (debugTests) System.out.println("\ntestWeaveMessagesDeclareSoft: Building with Five.lst");
compilerAdapter = new CompilerAdapter();
compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Five.lst").getAbsolutePath(),new BPM(),false);
@@ -167,7 +168,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* of weaving messages we expect is less.
*/
public void testWeaveMessagesBinaryAdvice() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryAdvice: Simple.jar + AspectAdvice.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryAdvice: Simple.jar + AspectAdvice.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -180,7 +181,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
}
public void testWeaveMessagesBinaryITD() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryITD: Simple.jar + AspectITD.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryITD: Simple.jar + AspectITD.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -194,7 +195,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesBinaryDeclare() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryDeclare: Simple.jar + AspectDeclare.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryDeclare: Simple.jar + AspectDeclare.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -209,7 +210,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave "declare soft: type: pointcut" and check the weave messages that come out.
*/
public void testWeaveMessagesBinaryDeclareSoft() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryDeclareSoft: Simple.jar + AspectDeclareSoft.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryDeclareSoft: Simple.jar + AspectDeclareSoft.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -226,7 +227,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
// BINARY WEAVING WHEN WE'VE LOST THE SOURCE POINTERS
public void testWeaveMessagesBinaryAdviceNoDebugInfo() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryAdvice: Simple.jar + AspectAdvice.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryAdvice: Simple.jar + AspectAdvice.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple_nodebug.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -239,7 +240,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
}
public void testWeaveMessagesBinaryITDNoDebugInfo() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryITD: Simple.jar + AspectITD.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryITD: Simple.jar + AspectITD.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple_nodebug.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -252,7 +253,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
}
public void testWeaveMessagesBinaryDeclareNoDebugInfo() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryDeclareNoDebugInfo: Simple.jar + AspectDeclare.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryDeclareNoDebugInfo: Simple.jar + AspectDeclare.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple_nodebug.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -267,7 +268,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
* Weave "declare soft: type: pointcut" and check the weave messages that come out.
*/
public void testWeaveMessagesBinaryDeclareSoftNoDebugInfo() {
- System.out.println("\n\n\n\n\n\ntestWeaveMessagesBinaryDeclareSoftNoDebugInfo: Simple.jar + AspectDeclareSoft.jar");
+ if (debugTests) System.out.println("\ntestWeaveMessagesBinaryDeclareSoftNoDebugInfo: Simple.jar + AspectDeclareSoft.jar");
Set inpath = new HashSet();
inpath.add(openFile("Simple_nodebug.jar"));
ideManager.getProjectProperties().setInpath(inpath);
@@ -338,7 +339,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
}
}
assertTrue("Didn't get these expected messages: "+fileContents,fileContents.size()==0);
- System.out.println("Successfully verified "+msgCount+" weaving messages");
+ if (debugTests) System.out.println("Successfully verified "+msgCount+" weaving messages");
} catch (Exception e) {
fail("Unexpected exception saving weaving messages:"+e);
}