From 6e2e466c27cdb159610d777e1e1f93c9b54aa311 Mon Sep 17 00:00:00 2001 From: abolz Date: Mon, 15 Jan 2018 20:39:16 +0100 Subject: [PATCH] Tests: Don't rely on the format used for floating-point formatting --- test/src/unit-regression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/unit-regression.cpp b/test/src/unit-regression.cpp index a119ed72..79edab3f 100644 --- a/test/src/unit-regression.cpp +++ b/test/src/unit-regression.cpp @@ -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() == static_cast(166020696663385964490.0)); } SECTION("issue #405 - Heap-buffer-overflow (OSS-Fuzz issue 342)")