mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit sm runner: simplify send tree condition
This commit is contained in:
@@ -39,7 +39,7 @@ public class JUnit3IdeaTestRunner extends TestRunner implements IdeaTestRunner {
|
||||
public int startRunnerWithArgs(String[] args, ArrayList listeners, String name, int count, boolean sendTree) {
|
||||
myListeners = listeners;
|
||||
mySendTree = sendTree && !(myTestsListener instanceof SMTestListener);
|
||||
if (sendTree) {
|
||||
if (mySendTree) {
|
||||
setPrinter(new TimeSender(myRegistry));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -51,9 +51,14 @@ public class JUnit4IdeaTestRunner implements IdeaTestRunner {
|
||||
else if (request instanceof FilterRequest) {
|
||||
description = getFilteredDescription(request, description);
|
||||
}
|
||||
TreeSender.sendTree(this, description, sendTree);
|
||||
if (myTestsListener instanceof SMTestSender && sendTree) {
|
||||
((SMTestSender)myTestsListener).sendTree(description);
|
||||
|
||||
if (myTestsListener instanceof SMTestSender) {
|
||||
if (sendTree) {
|
||||
((SMTestSender)myTestsListener).sendTree(description);
|
||||
}
|
||||
sendTree = false;
|
||||
} else {
|
||||
TreeSender.sendTree(this, description, sendTree);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
@@ -225,7 +225,7 @@ public class JUnitStarter {
|
||||
}
|
||||
}
|
||||
testRunner.setStreams(out, err, 0);
|
||||
return testRunner.startRunnerWithArgs(args, listeners, name, ourCount, !SM_RUNNER);
|
||||
return testRunner.startRunnerWithArgs(args, listeners, name, ourCount, true);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace(System.err);
|
||||
|
||||
Reference in New Issue
Block a user