mirror of
https://github.com/nlohmann/json
synced 2024-11-23 20:40:08 +00:00
Tests: Don't rely on the format used for floating-point formatting
This commit is contained in:
parent
107c21a488
commit
6e2e466c27
@ -785,7 +785,7 @@ TEST_CASE("regression tests")
|
||||
{
|
||||
json j = json::parse("166020696663385964490");
|
||||
CHECK(j.is_number_float());
|
||||
CHECK(j.dump() == "1.66020696663386e+20");
|
||||
CHECK(j.get<json::number_float_t>() == static_cast<json::number_float_t>(166020696663385964490.0));
|
||||
}
|
||||
|
||||
SECTION("issue #405 - Heap-buffer-overflow (OSS-Fuzz issue 342)")
|
||||
|
Loading…
Reference in New Issue
Block a user