summaryrefslogtreecommitdiffstats
path: root/testing-drivers/testsrc/org
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-10-29 08:50:34 +0000
committerwisberg <wisberg>2003-10-29 08:50:34 +0000
commita6691df972e5dcf5e955f9a75bbba36b7a591c9e (patch)
treeddb5a005f582ad20f8eb9c28d3d47d543788bb65 /testing-drivers/testsrc/org
parentfb53bc7d6dfec828720a5c4b06c49ffa784a874e (diff)
downloadaspectj-a6691df972e5dcf5e955f9a75bbba36b7a591c9e.tar.gz
aspectj-a6691df972e5dcf5e955f9a75bbba36b7a591c9e.zip
better mapping from messages to JUnit failure/error
Diffstat (limited to 'testing-drivers/testsrc/org')
-rw-r--r--testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java b/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
index 17eef7c34..77c38c35d 100644
--- a/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
+++ b/testing-drivers/testsrc/org/aspectj/testing/drivers/HarnessJUnitUtil.java
@@ -88,9 +88,9 @@ public class HarnessJUnitUtil {
/**
* Dump results for Test from status into TestResult.
- * This defers to the status to determine if it failed,
- * and treats ABORT as errors
- * and everything else as failures.
+ * FAIL is a failure,
+ * ERROR and ABORT are errors,
+ * and INFO, WARNING, and DEBUG are ignored.
* @param result the TestResult sink
* @param status the IRunStatus source
* @param test the Test to associate with the results
@@ -103,13 +103,15 @@ public class HarnessJUnitUtil {
Test test,
int numIncomplete) {
if (!status.runResult()) {
- String m = render(status, null);
- AssertionFailedError failure = new AssertionFailedError(m);
- if (status.hasAnyMessage(IMessage.ABORT, true)) {
- result.addError(test, failure);
- } else {
+ if (status.hasAnyMessage(IMessage.FAIL, false)) {
+ String m = render(status, null);
+ AssertionFailedError failure = new AssertionFailedError(m);
result.addFailure(test, failure);
- }
+ } else if (status.hasAnyMessage(IMessage.ERROR, true)) {
+ String m = render(status, null);
+ AssertionFailedError failure = new AssertionFailedError(m);
+ result.addError(test, failure);
+ } // /XXX skip INFO, DEBUG
}
return 0; // XXX not doing incomplete
}