1 9 package test.ozoneDB.DxLib; 10 11 import test.OzoneTestCase; 12 13 14 16 abstract class AbstractTest extends OzoneTestCase { 17 18 long start; 19 long stop; 20 21 public AbstractTest(String name) { 22 super(name); 23 } 24 25 27 public void startTimer(String className, String testName) { 28 className = className.substring(className.lastIndexOf(".") + 1); 29 System.out.print(testName + ":" + className + " - "); 30 System.out.flush(); 31 32 start = System.currentTimeMillis(); 33 } 34 35 36 38 public void stopTimer() { 39 stop = System.currentTimeMillis(); 40 printTime(); 41 } 42 43 44 46 public void printTime() { 47 System.out.println("\t time: " + (stop - start) + " msec"); 48 } 49 50 51 53 public void error() { 54 fail("error"); 55 } 56 } 57 | Popular Tags |