]> granicus.if.org Git - icu/commitdiff
ICU-13443 Changing number error test to use UErrorCode equality instead of UBool...
authorShane Carr <shane@unicode.org>
Thu, 1 Mar 2018 01:02:44 +0000 (01:02 +0000)
committerShane Carr <shane@unicode.org>
Thu, 1 Mar 2018 01:02:44 +0000 (01:02 +0000)
X-SVN-Rev: 41026

icu4c/source/test/intltest/numbertest_api.cpp

index 64656c81758f89b3a440349596af571889f627c1..5b1c46f1e5e7e5c6faa67fc1cfcb84ea067388c4 100644 (file)
@@ -1764,14 +1764,14 @@ void NumberFormatterApiTest::errors() {
         FormattedNumber fn = lnf.formatInt(1, status1);
         assertEquals(
                 "Should fail since rounder is not legal",
-                (UBool) TRUE,
-                (UBool) U_FAILURE(status1));
+                U_NUMBER_ARG_OUTOFBOUNDS_ERROR,
+                status1);
         FieldPosition fp;
         fn.populateFieldPosition(fp, status2);
         assertEquals(
                 "Should fail on terminal method",
-                (UBool) TRUE,
-                (UBool) U_FAILURE(status2));
+                U_NUMBER_ARG_OUTOFBOUNDS_ERROR,
+                status2);
     }
 
     {
@@ -1779,8 +1779,8 @@ void NumberFormatterApiTest::errors() {
         lnf.copyErrorTo(status);
         assertEquals(
                 "Should fail since rounder is not legal",
-                (UBool) TRUE,
-                (UBool) U_FAILURE(status));
+                U_NUMBER_ARG_OUTOFBOUNDS_ERROR,
+                status);
     }
 }