]> granicus.if.org Git - icu/commitdiff
ICU-9366 improved message from Java TestFmwk.fail() function.
authorAndy Heninger <andy.heninger@gmail.com>
Tue, 5 Jun 2012 19:45:00 +0000 (19:45 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Tue, 5 Jun 2012 19:45:00 +0000 (19:45 +0000)
X-SVN-Rev: 31906

icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestFmwk.java

index 8e96cf1cb3d40b7d57e06ae1a245a5b67a13c363..963168081eaa45f481ddbb20598a84f01485a742 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *******************************************************************************
- * Copyright (C) 1996-2011, International Business Machines Corporation and    *
+ * Copyright (C) 1996-2012, International Business Machines Corporation and    *
  * others. All Rights Reserved.                                                *
  *******************************************************************************
  */
@@ -1800,8 +1800,18 @@ public class TestFmwk extends AbstractTestLog {
                 "!=", true);
     }
 
+    protected void fail() {
+        fail("");
+    }
+    
     protected void fail(String message) {
-        errln(message);
+        if (message == null) {
+            message = "";            
+        }
+        if (!message.equals("")) {
+            message = ": " + message;
+        }
+        errln(sourceLocation() + message);
     }
 
     private boolean handleAssert(boolean result, String message,