+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got " + toString(actual));
+ }
+#endif
+ return TRUE;
+}
+
+
+UBool IntlTest::assertEquals(const char* message,
+ UErrorCode expected,
+ UErrorCode actual) {
+ if (expected != actual) {
+ errln((UnicodeString)"FAIL: " + message + "; got " +
+ u_errorName(actual) +
+ "; expected " + u_errorName(expected));
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got " + u_errorName(actual));
+ }
+#endif
+ return TRUE;
+}
+
+UBool IntlTest::assertEquals(const char* message,
+ const UnicodeSet& expected,
+ const UnicodeSet& actual) {
+ IcuTestErrorCode status(*this, "assertEqualsUniSet");
+ if (expected != actual) {
+ errln((UnicodeString)"FAIL: " + message + "; got " +
+ toString(actual, status) +
+ "; expected " + toString(expected, status));
+ return FALSE;
+ }
+#ifdef VERBOSE_ASSERTIONS
+ else {
+ logln((UnicodeString)"Ok: " + message + "; got " + toString(actual, status));
+ }
+#endif
+ return TRUE;
+}
+
+
+#if !UCONFIG_NO_FORMATTING
+UBool IntlTest::assertEquals(const char* message,
+ const Formattable& expected,
+ const Formattable& actual,
+ UBool possibleDataError) {
+ if (expected != actual) {
+ if (possibleDataError) {
+ dataerrln((UnicodeString)"FAIL: " + message + "; got " +
+ toString(actual) +
+ "; expected " + toString(expected));
+ } else {
+ errln((UnicodeString)"FAIL: " + message + "; got " +
+ toString(actual) +
+ "; expected " + toString(expected));
+ }
+ return FALSE;
+ }