ICU-9366 improved message from Java TestFmwk.fail() function.

X-SVN-Rev: 31906
This commit is contained in:
Andy Heninger 2012-06-05 19:45:00 +00:00
parent 709b0884cc
commit 694d6f2537

View 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. * * others. All Rights Reserved. *
******************************************************************************* *******************************************************************************
*/ */
@ -1800,8 +1800,18 @@ public class TestFmwk extends AbstractTestLog {
"!=", true); "!=", true);
} }
protected void fail() {
fail("");
}
protected void fail(String message) { 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, private boolean handleAssert(boolean result, String message,