mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-02-09 03:06:46 +08:00
Merge pull request #190 from alugowski/fix_subnormal_tests
Fix subnormal test fails on GCC 9
This commit is contained in:
commit
843fb97064
@ -596,7 +596,7 @@ TEST_CASE("powers_of_ten") {
|
|||||||
double actual;
|
double actual;
|
||||||
auto result = fast_float::from_chars(buf, buf + 1000, actual);
|
auto result = fast_float::from_chars(buf, buf + 1000, actual);
|
||||||
double expected = ((i >= -323) ? testing_power_of_ten[i + 323] : std::pow(10, i));
|
double expected = ((i >= -323) ? testing_power_of_ten[i + 323] : std::pow(10, i));
|
||||||
auto expected_ec = (expected == 0 || std::isinf(expected)) ? std::errc::result_out_of_range : std::errc();
|
auto expected_ec = (i < -323 || i > 308) ? std::errc::result_out_of_range : std::errc();
|
||||||
CHECK_MESSAGE(result.ec == expected_ec, " I could not parse " << buf);
|
CHECK_MESSAGE(result.ec == expected_ec, " I could not parse " << buf);
|
||||||
CHECK_MESSAGE(actual == expected, "String '" << buf << "'parsed to " << actual);
|
CHECK_MESSAGE(actual == expected, "String '" << buf << "'parsed to " << actual);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user