fish_tests: actually test fish_wcstod

The test was running against the standard library rather than the fish
replacement.
This commit is contained in:
David Adam 2021-12-27 14:06:49 +08:00
parent 36be635393
commit 2e6bfe5c68

View File

@ -2985,7 +2985,7 @@ static void test_wcstod() {
auto tod_test = [](const wchar_t *a, const char *b) {
char *narrow_end = nullptr;
wchar_t *wide_end = nullptr;
double val1 = std::wcstod(a, &wide_end);
double val1 = fish_wcstod(a, &wide_end);
double val2 = strtod(b, &narrow_end);
do_test((std::isnan(val1) && std::isnan(val2)) || fabs(val1 - val2) <= __DBL_EPSILON__);
do_test(wide_end - a == narrow_end - b);