Floating-point NaN or Infinity values should be allowed as a feature #209

Introduce 'allowSpecialFloats' for readers and 'useSpecialFloats' for writers, use consistent macro snprintf definition for writers and readers, provide new unit tests for #209
This commit is contained in:
drgler 2015-09-03 22:19:22 +02:00
parent 2084563efb
commit 63c747218b

View File

@ -2312,6 +2312,7 @@ JSONTEST_FIXTURE(CharReaderAllowSpecialFloatsTest, issue209) {
JSONTEST_ASSERT_EQUAL(std::numeric_limits<double>::infinity(), root["posInf"].asDouble());
JSONTEST_ASSERT_EQUAL(-std::numeric_limits<double>::infinity(), root["NegInf"].asDouble());
}
delete reader;
}
struct BuilderTest : JsonTest::TestCase {};