junit: initial magnitude for suite state should be NOT_RUN (updateMagnitude should check the case)

This commit is contained in:
anna
2009-11-04 12:30:05 +03:00
parent cce067adaa
commit 902165cf2e
2 changed files with 4 additions and 4 deletions
@@ -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) {