1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-22 15:21:52 +03:00

🚑 fix for #465

This commit is contained in:
Niels Lohmann
2017-02-20 22:48:27 +01:00
parent b04543ecc5
commit 7d14f167b8
4 changed files with 27 additions and 22 deletions

View File

@ -783,4 +783,13 @@ TEST_CASE("regression tests")
json j = R"({"bool_value":true,"double_value":2.0,"int_value":10,"level1":{"list_value":[3,"hi",false],"tmp":5.0},"string_value":"hello"})"_json;
CHECK(j["double_value"].is_number_float());
}
SECTION("issue #465 - roundtrip error while parsing 1000000000000000010E5")
{
json j1 = json::parse("1000000000000000010E5");
std::string s1 = j1.dump();
json j2 = json::parse(s1);
std::string s2 = j2.dump();
CHECK(s1 == s2);
}
}