コード例 #1
0
 protected void runTestProfiled() throws Throwable {
   // Warmup run, notably to trigger all needed classloading.
   super.runTest();
   long t0 = System.nanoTime();
   try {
     super.runTest();
   } finally {
     long elapsedMillis = millisElapsedSince(t0);
     if (elapsedMillis >= profileThreshold)
       System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
   }
 }
コード例 #2
0
 private void runTest(TestCase testCase) {
   for (Harness harness : harnesses) {
     try {
       testCase.runTest(harness);
     } catch (MockitoAssertionError e) {
       throw new Error("Failed to get expected call on " + harness, e);
     }
   }
 }
コード例 #3
0
 protected void runTest() throws Throwable {
   if (profileTests) runTestProfiled();
   else super.runTest();
 }