@Override public String toString() { return super.toString() + "(repeated)"; } }
@Override public int countTestCases() { return super.countTestCases() * fTimesRepeat; }
@Override protected void setUp() throws Exception { super.setUp(); oneTimeSetupDone = true; forceOneTimeTearDown = false; test.oneTimeSetUp(); }
@Override protected void tearDown() throws Exception { super.tearDown(); oneTimeSetupDone = false; forceOneTimeTearDown = false; test.oneTimeTearDown(); } }
private static Description makeDescription(Test test) { if (test instanceof TestCase) { TestCase tc = (TestCase) test; return Description.createTestDescription(tc.getClass(), tc.getName()); } else if (test instanceof TestSuite) { TestSuite ts = (TestSuite) test; String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName(); Description description = Description.createSuiteDescription(name); int n = ts.testCount(); for (int i = 0; i < n; i++) { Description made = makeDescription(ts.testAt(i)); description.addChild(made); } return description; } else if (test instanceof Describable) { Describable adapter = (Describable) test; return adapter.getDescription(); } else if (test instanceof TestDecorator) { TestDecorator decorator = (TestDecorator) test; return makeDescription(decorator.getTest()); } else { // This is the best we can do in this case return Description.createSuiteDescription(test.getClass()); } }
public void run(TestResult result) { basicRun(result); }
synchronized void waitUntilFinished() { while (fActiveTestDeathCount < testCount()) { try { wait(); } catch (InterruptedException e) { return; // ignore } } }
@Override public void run(TestResult result) { for (int i = 0; i < fTimesRepeat; i++) { if (result.shouldStop()) { break; } super.run(result); } }
@Override public void run(TestResult result) { fActiveTestDeathCount = 0; super.run(result); waitUntilFinished(); }
@Override public void run() { try { // inlined due to limitation in VA/Java //ActiveTestSuite.super.runTest(test, result); test.run(result); } finally { ActiveTestSuite.this.runFinished(); } } };
private static Description makeDescription(Test test) { if (test instanceof TestCase) { TestCase tc = (TestCase) test; return Description.createTestDescription(tc.getClass(), tc.getName(), getAnnotations(tc)); } else if (test instanceof TestSuite) { TestSuite ts = (TestSuite) test; String name = ts.getName() == null ? createSuiteDescription(ts) : ts.getName(); Description description = Description.createSuiteDescription(name); int n = ts.testCount(); for (int i = 0; i < n; i++) { Description made = makeDescription(ts.testAt(i)); description.addChild(made); } return description; } else if (test instanceof Describable) { Describable adapter = (Describable) test; return adapter.getDescription(); } else if (test instanceof TestDecorator) { TestDecorator decorator = (TestDecorator) test; return makeDescription(decorator.getTest()); } else { // This is the best we can do in this case return Description.createSuiteDescription(test.getClass()); } }
@Override public String toString() { return super.toString() + "(repeated)"; } }
@Override public int countTestCases() { return super.countTestCases() * fTimesRepeat; }
public void run(TestResult result) { basicRun(result); }
synchronized void waitUntilFinished() { while (fActiveTestDeathCount < testCount()) { try { wait(); } catch (InterruptedException e) { return; // ignore } } }
@Override public void run(TestResult result) { for (int i = 0; i < fTimesRepeat; i++) { if (result.shouldStop()) { break; } super.run(result); } }
@Override public void run(TestResult result) { fActiveTestDeathCount = 0; super.run(result); waitUntilFinished(); }
@Override public void run() { try { // inlined due to limitation in VA/Java //ActiveTestSuite.super.runTest(test, result); test.run(result); } finally { ActiveTestSuite.this.runFinished(); } } };