aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-04-29 00:26:19 +0000
committerwisberg <wisberg>2003-04-29 00:26:19 +0000
commitab1fa13080066b2d729bde837cc73bf501661cf5 (patch)
tree3b6664ae6bee209d7afd9403daefe4d085967d2e
parent52882bef3e9112f4a42016ba537cc1f6fbef5104 (diff)
downloadaspectj-ab1fa13080066b2d729bde837cc73bf501661cf5.tar.gz
aspectj-ab1fa13080066b2d729bde837cc73bf501661cf5.zip
track internal API changes
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
index d5c0c7f6a..05fa965e8 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
@@ -15,6 +15,7 @@ package org.aspectj.ajdt.ajc;
import org.aspectj.ajdt.internal.core.builder.AjBuildConfig;
import org.aspectj.bridge.AbortException;
+import org.aspectj.bridge.CountingMessageHandler;
import org.aspectj.bridge.MessageWriter;
import org.aspectj.util.StreamPrintWriter;
import org.eclipse.jdt.core.compiler.InvalidInputException;
@@ -31,14 +32,17 @@ public class AjdtCommandTestCase extends TestCase {
private StreamPrintWriter outputWriter = new StreamPrintWriter(new PrintWriter(System.out));
private AjdtCommand command = new AjdtCommand();
private MessageWriter messageWriter = new MessageWriter(outputWriter, false);
-
+ private CountingMessageHandler counter
+ = new CountingMessageHandler(messageWriter);
public AjdtCommandTestCase(String name) {
super(name);
// command.buildArgParser.out = outputWriter;
}
public void testIncrementalOption() throws InvalidInputException {
- AjBuildConfig config = command.genBuildConfig(new String[] { "-incremental" }, messageWriter);
+ AjBuildConfig config = command.genBuildConfig(
+ new String[] { "-incremental" },
+ counter);
assertTrue(
"didn't specify source root",
@@ -47,7 +51,7 @@ public class AjdtCommandTestCase extends TestCase {
outputWriter.flushBuffer();
config = command.genBuildConfig(
new String[] { "-incremental", "-sourceroots", "testdata/src1" },
- messageWriter);
+ counter);
assertTrue(
outputWriter.getContents(),
@@ -56,7 +60,7 @@ public class AjdtCommandTestCase extends TestCase {
outputWriter.flushBuffer();
config = command.genBuildConfig(
new String[] { "-incremental", "testdata/src1/Hello.java" },
- messageWriter);
+ counter);
assertTrue(
"specified a file",
@@ -65,7 +69,9 @@ public class AjdtCommandTestCase extends TestCase {
public void testBadOptionAndUsagePrinting() throws InvalidInputException {
try {
- command.genBuildConfig(new String[] { "-mubleBadOption" }, messageWriter);
+ command.genBuildConfig(
+ new String[] { "-mubleBadOption" },
+ counter);
} catch (AbortException ae) { }
assertTrue(
@@ -76,7 +82,9 @@ public class AjdtCommandTestCase extends TestCase {
public void testHelpUsagePrinting() {
try {
- command.genBuildConfig(new String[] { "-help" }, messageWriter);
+ command.genBuildConfig(
+ new String[] { "-help" },
+ counter);
} catch (AbortException ae) { }
assertTrue(
outputWriter.getContents() + " contains? " + "Usage",
@@ -85,7 +93,9 @@ public class AjdtCommandTestCase extends TestCase {
public void testVersionOutput() throws InvalidInputException {
try {
- command.genBuildConfig(new String[] { "-version" }, messageWriter);
+ command.genBuildConfig(
+ new String[] { "-version" },
+ counter);
} catch (AbortException ae) { }
assertTrue(
"version output",
@@ -93,7 +103,9 @@ public class AjdtCommandTestCase extends TestCase {
}
public void testNonExistingLstFile() {
- command.genBuildConfig(new String[] { "@mumbleDoesNotExist" }, messageWriter);
+ command.genBuildConfig(
+ new String[] { "@mumbleDoesNotExist" },
+ counter);
assertTrue(
outputWriter.getContents(),