decoupling testRunner from idea-rt

This commit is contained in:
Dmitry Jemerov
2009-09-01 12:55:23 +04:00
parent d01c846ca5
commit e9163e470c
4 changed files with 7 additions and 4 deletions
@@ -25,6 +25,8 @@ public interface AbstractTestProxy {
boolean isLeaf();
boolean isPassed();
String getName();
Location getLocation(final Project project);
@@ -1,7 +1,5 @@
package com.intellij.execution.testframework;
import com.intellij.rt.execution.junit.states.PoolOfTestStates;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -58,7 +56,7 @@ public abstract class Filter {
public static final Filter NOT_PASSED = new Filter() {
public boolean shouldAccept(final AbstractTestProxy test) {
return test.getMagnitude() > PoolOfTestStates.PASSED_INDEX;
return !test.isPassed();
}
};
-1
View File
@@ -9,7 +9,6 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="platform-api" />
<orderEntry type="module" module-name="lang-impl" />
<orderEntry type="module" module-name="idea_rt" />
<orderEntry type="module" module-name="platform-impl" />
</component>
</module>
@@ -77,6 +77,10 @@ public class SMTestProxy extends CompositePrintable implements PrintableTestProx
return myChildren == null || myChildren.isEmpty();
}
public boolean isPassed() {
return myState.getMagnitude() == TestStateInfo.Magnitude.SKIPPED_INDEX || myState.getMagnitude() != TestStateInfo.Magnitude.COMPLETE_INDEX;
}
public void addChild(final SMTestProxy child) {
if (myChildren == null) {
myChildren = new ArrayList<SMTestProxy>();