From ef3ad895aeece70cc187f1c0ad6feca4fef6dc43 Mon Sep 17 00:00:00 2001 From: "Joshua C. Randall" Date: Sat, 28 Feb 2015 15:53:48 +0000 Subject: [PATCH] Adds (failing) test for small float serialisation --- test/unit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit.cpp b/test/unit.cpp index 6d0904bf7..6e7a1a68b 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -1160,6 +1160,12 @@ TEST_CASE("object inspection") CHECK(s.find("42.23") != std::string::npos); } + SECTION("dump and small floating-point numbers") + { + auto s = json(1.23456e-78).dump(); + CHECK(s.find("1.23456e-78") != std::string::npos); + } + SECTION("dump and non-ASCII characters") { CHECK(json("ä").dump() == "\"ä\"");