From 3fed057513d3b9bd64d31b81937756ddaa7202bf Mon Sep 17 00:00:00 2001 From: "Cameron T. Druyor" Date: Thu, 28 Apr 2016 17:49:14 -0400 Subject: [PATCH] Just poking around right now. --- src/json.hpp | 5 +++++ test/unit.cpp | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 57a8f4c72..60387e9c9 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6294,6 +6294,11 @@ class basic_json << std::fixed << m_value.number_float; o << ss.str(); } + std::stringstream applesauce; + applesauce << o.rdbuf(); + std::string s2 = applesauce.str(); + if(s2.compare("2e01") == 0) + throw std::logic_error("found it"); } else { diff --git a/test/unit.cpp b/test/unit.cpp index 2666e1111..4a06e3041 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -12716,7 +12716,7 @@ TEST_CASE("regression tests") json j2a = 2342e-2; //issue #230 - //json j2b = json::parse("2342e-2"); + json j2b = json::parse("2342e-2"); json j3a = 10E3; json j3b = json::parse("10E3"); @@ -12740,7 +12740,7 @@ TEST_CASE("regression tests") CHECK(j2a.dump() == "23.42"); //issue #230 - //CHECK(j2b.dump() == "23.42"); + CHECK(j2b.dump() == "23.42"); CHECK(j3a.dump() == "10000"); CHECK(j3b.dump() == "1E04"); @@ -12757,4 +12757,5 @@ TEST_CASE("regression tests") CHECK(dest == expected); } + }