-UBool IntlTest::assertTrue(const char* message, UBool condition, UBool quiet) {
- if (!condition) {
- errln("FAIL: assertTrue() failed: %s", message);
- } else if (!quiet) {
- logln("Ok: %s", message);
+UBool IntlTest::assertTrue(const char* message, UBool condition, UBool quiet, UBool possibleDataError, const char *file, int line) {
+ if (file != NULL) {
+ if (!condition) {
+ if (possibleDataError) {
+ dataerrln("%s:%d: FAIL: assertTrue() failed: %s", file, line, message);
+ } else {
+ errln("%s:%d: FAIL: assertTrue() failed: %s", file, line, message);
+ }
+ } else if (!quiet) {
+ logln("%s:%d: Ok: %s", file, line, message);
+ }
+ } else {
+ if (!condition) {
+ if (possibleDataError) {
+ dataerrln("FAIL: assertTrue() failed: %s", message);
+ } else {
+ errln("FAIL: assertTrue() failed: %s", message);
+ }
+ } else if (!quiet) {
+ logln("Ok: %s", message);
+ }
+