Skip to content

Commit 63c7472

Browse files
committed
Floating-point NaN or Infinity values should be allowed as a feature open-source-parsers#209
Introduce 'allowSpecialFloats' for readers and 'useSpecialFloats' for writers, use consistent macro snprintf definition for writers and readers, provide new unit tests for open-source-parsers#209
1 parent 2084563 commit 63c7472

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test_lib_json/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,6 +2312,7 @@ JSONTEST_FIXTURE(CharReaderAllowSpecialFloatsTest, issue209) {
23122312
JSONTEST_ASSERT_EQUAL(std::numeric_limits<double>::infinity(), root["posInf"].asDouble());
23132313
JSONTEST_ASSERT_EQUAL(-std::numeric_limits<double>::infinity(), root["NegInf"].asDouble());
23142314
}
2315+
delete reader;
23152316
}
23162317

23172318
struct BuilderTest : JsonTest::TestCase {};

0 commit comments

Comments
 (0)