]> granicus.if.org Git - icu/commitdiff
ICU-13415 porting: std::isinf/std::isnan back to uprv. also see ICU-13315
authorSteven R. Loomis <srl@icu-project.org>
Tue, 24 Oct 2017 22:39:03 +0000 (22:39 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Tue, 24 Oct 2017 22:39:03 +0000 (22:39 +0000)
X-SVN-Rev: 40629

icu4c/source/test/intltest/numfmtst.cpp

index 410566416625718856987a680f293a9939818f8c..fc562f385aceb2bff5504d2fd8dfcc5776e8e08c 100644 (file)
@@ -425,19 +425,19 @@ UBool NumberFormatTestDataDriven::isParsePass(
         return TRUE; // TRUE because failure handling is in the test suite
     }
     if (tuple.output == "NaN") {
-        if (!std::isnan(result.getDouble())) {
+        if (!uprv_isNaN(result.getDouble())) {
             appendErrorMessage.append("Expected NaN, but got: " + resultStr);
             return FALSE;
         }
         return TRUE;
     } else if (tuple.output == "Inf") {
-        if (!std::isinf(result.getDouble()) || result.getDouble() < 0) {
+        if (!uprv_isInfinite(result.getDouble()) || result.getDouble() < 0) {
             appendErrorMessage.append("Expected Inf, but got: " + resultStr);
             return FALSE;
         }
         return TRUE;
     } else if (tuple.output == "-Inf") {
-        if (!std::isinf(result.getDouble()) || result.getDouble() > 0) {
+        if (!uprv_isInfinite(result.getDouble()) || result.getDouble() > 0) {
             appendErrorMessage.append("Expected -Inf, but got: " + resultStr);
             return FALSE;
         }