From b8b0c39c77bf547506b67041dda6646f92308799 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 5 Jan 2019 12:31:24 +0100 Subject: [PATCH] fish_tests: Use std::isnan Fixes the tests on Ubuntu 16.04 "xenial". --- src/fish_tests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp index abe21a2e5..e5a3d9426 100644 --- a/src/fish_tests.cpp +++ b/src/fish_tests.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -2302,7 +2303,7 @@ static void test_wcstod() { wchar_t *wide_end = nullptr; double val1 = wcstod(a, &wide_end); double val2 = strtod(b, &narrow_end); - do_test((isnan(val1) && isnan(val2)) || fabs(val1 - val2) <= __DBL_EPSILON__); + do_test((std::isnan(val1) && std::isnan(val2)) || fabs(val1 - val2) <= __DBL_EPSILON__); do_test(wide_end - a == narrow_end - b); }; tod_test(L"", "");