Tests: Don't rely on the format used for floating-point formatting

This commit is contained in:
abolz 2018-01-15 20:39:16 +01:00
parent 107c21a488
commit 6e2e466c27

View file

@ -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)")