mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
junit: initial magnitude for suite state should be NOT_RUN (updateMagnitude should check the case)
This commit is contained in:
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
|
||||
public class SuiteState extends TestState {
|
||||
private final TestProxy myTest;
|
||||
private int myMaxMagnitude = -1;
|
||||
private int myMaxMagnitude = PoolOfTestStates.NOT_RUN_INDEX;
|
||||
private boolean myHasRunning;
|
||||
private final StateCache myCache = new StateCache();
|
||||
|
||||
@@ -96,7 +96,9 @@ public class SuiteState extends TestState {
|
||||
}
|
||||
|
||||
public void updateMagnitude(int magnitude) {
|
||||
if (myMaxMagnitude < magnitude) {
|
||||
if (myMaxMagnitude == PoolOfTestStates.NOT_RUN_INDEX) {
|
||||
myMaxMagnitude = magnitude;
|
||||
} else if (myMaxMagnitude < magnitude) {
|
||||
myMaxMagnitude = magnitude;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,8 +54,6 @@ class TestRenderer {
|
||||
mapIcon(PoolOfTestStates.COMPARISON_FAILURE, PoolOfTestIcons.FAILED_ICON);
|
||||
mapIcon(PoolOfTestStates.ERROR_INDEX, PoolOfTestIcons.ERROR_ICON);
|
||||
mapIcon(PoolOfTestStates.IGNORED_INDEX, PoolOfTestIcons.IGNORED_ICON);
|
||||
|
||||
mapIcon(-1, PoolOfTestIcons.NOT_RAN);
|
||||
}
|
||||
|
||||
private static void mapIcon(final int index, final Icon icon) {
|
||||
|
||||
Reference in New Issue
Block a user