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

This commit is contained in:
abolz 2017-12-08 15:14:54 +01:00
parent 3232e1f52e
commit 7c3fce7289

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