Skip to content

Commit

Permalink
fix ValueTest/integers, CharReaderAllowSpecialFloatsTest/issue209 tes…
Browse files Browse the repository at this point in the history
…t failure when fp:fast on msvc
  • Loading branch information
fo40225 committed May 5, 2018
1 parent 3f0d91f commit 4050143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test_lib_json/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,8 @@ JSONTEST_FIXTURE(ValueTest, integers) {
JSONTEST_ASSERT_EQUAL(Json::UInt64(1) << 63, val.asUInt64());
JSONTEST_ASSERT_EQUAL(Json::UInt64(1) << 63, val.asLargestUInt());
JSONTEST_ASSERT_EQUAL(uint64ToDouble(Json::UInt64(1) << 63), val.asDouble());
JSONTEST_ASSERT_EQUAL(float(uint64ToDouble(Json::UInt64(1) << 63)),
val.asFloat());
JSONTEST_ASSERT_EQUAL(float(Json::UInt64(1) << 63), val.asFloat());

JSONTEST_ASSERT_EQUAL(true, val.asBool());
JSONTEST_ASSERT_STRING_EQUAL("9.2233720368547758e+18",
normalizeFloatingPointStr(JsonTest::ToJsonString(val.asString())));
Expand Down Expand Up @@ -2405,7 +2405,7 @@ JSONTEST_FIXTURE(CharReaderAllowSpecialFloatsTest, issue209) {
JSONTEST_ASSERT_STRING_EQUAL("", errs);
JSONTEST_ASSERT_EQUAL(3u, root.size());
double n = root["a"].asDouble();
JSONTEST_ASSERT(n != n);
JSONTEST_ASSERT(isnan(n));
JSONTEST_ASSERT_EQUAL(std::numeric_limits<double>::infinity(), root.get("b", 0.0));
JSONTEST_ASSERT_EQUAL(-std::numeric_limits<double>::infinity(), root.get("c", 0.0));
}
Expand Down

0 comments on commit 4050143

Please sign in to comment.