mirror of
https://github.com/fastfloat/fast_float.git
synced 2025-12-07 17:26:51 +08:00
Fix subnormal test fails on GCC 9
This commit is contained in:
parent
fbd5bd712e
commit
ca90e36413
@ -596,7 +596,7 @@ TEST_CASE("powers_of_ten") {
|
||||
double 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));
|
||||
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(actual == expected, "String '" << buf << "'parsed to " << actual);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user