Changeset 3808


Ignore:
Timestamp:
03/12/08 16:01:53 (12 years ago)
Author:
curtis
Message:

Add timestamps to test output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/tests/testng/FormatReaderTest.java

    r3767 r3808  
    779779    } 
    780780 
    781     LogTools.print("Initializing " + id + ": "); 
     781    LogTools.print(timestamp() + "Initializing " + id + ": "); 
    782782    try { 
    783783      reader.setId(id); 
     
    839839   */ 
    840840  private static void result(String testName, boolean success, String msg) { 
    841     LogTools.println(testName + ": " + (success ? "PASSED" : "FAILED") + 
    842       (msg == null ? "" : " (" + msg + ")")); 
     841    LogTools.println(timestamp() + ": " + testName + ": " + 
     842      (success ? "PASSED" : "FAILED") + (msg == null ? "" : " (" + msg + ")")); 
    843843    if (msg == null) assert success; 
    844844    else assert success : msg; 
     
    852852  } 
    853853 
     854  /** Gets a timestamp for the current moment. */ 
     855  private static String timestamp() { 
     856    return DataTools.convertDate(System.currentTimeMillis(), DataTools.UNIX); 
     857  } 
     858 
    854859} 
Note: See TracChangeset for help on using the changeset viewer.