mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
OC-545 OCUnit: improve test output
This commit is contained in:
+10
-7
@@ -175,10 +175,7 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
|
||||
|
||||
private void processConsistentText(final String text, final Key outputType, boolean tcLikeFakeOutput) {
|
||||
try {
|
||||
final ServiceMessage serviceMessage = parseServiceMessage(text, outputType);
|
||||
if (serviceMessage != null) {
|
||||
serviceMessage.visit(myServiceMessageVisitor);
|
||||
} else {
|
||||
if (!processServiceMessages(text, outputType, myServiceMessageVisitor)) {
|
||||
// Filters \n
|
||||
if (text.equals("\n") && tcLikeFakeOutput) {
|
||||
// ServiceMessages protocol requires that every message
|
||||
@@ -199,11 +196,17 @@ public class OutputToGeneralTestEventsConverter implements ProcessOutputConsumer
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected ServiceMessage parseServiceMessage(final String text, final Key outputType) throws ParseException {
|
||||
return ServiceMessage.parse(text);
|
||||
protected boolean processServiceMessages(final String text,
|
||||
final Key outputType,
|
||||
final ServiceMessageVisitor visitor) throws ParseException {
|
||||
final ServiceMessage message = ServiceMessage.parse(text);
|
||||
if (message != null) {
|
||||
message.visit(visitor);
|
||||
}
|
||||
return message != null;
|
||||
}
|
||||
|
||||
|
||||
private void fireOnTestStarted(final String testName, @Nullable final String locationUrl) {
|
||||
assertNotNull(testName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user