From fdce38fa79c5b0d2290e384f9e77984407c8cf13 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 11 Dec 2016 00:39:26 +0100 Subject: [PATCH] :white_check_mark: fixed a test case --- test/src/unit-msgpack.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/src/unit-msgpack.cpp b/test/src/unit-msgpack.cpp index 26ce76d2..43b16031 100644 --- a/test/src/unit-msgpack.cpp +++ b/test/src/unit-msgpack.cpp @@ -851,11 +851,11 @@ TEST_CASE("MessagePack") } } - SECTION("from double") + SECTION("from float32") { - auto given = std::vector({0x19, 0x41, 0xc8, 0x00, 0x00}); + auto given = std::vector({0xca, 0x41, 0xc8, 0x00, 0x01}); json j = json::from_msgpack(given); - CHECK(j == json(25.0)); + CHECK(j.get() == Approx(25.0000019073486)); } }