Skip to content

Commit

Permalink
Fixed some test bugs that show up when 64-bit mode is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsa committed May 26, 2011
1 parent 4b819c2 commit a2fb7fb
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 @@ -697,7 +697,7 @@ JSONTEST_FIXTURE( ValueTest, integers )
JSONTEST_ASSERT_EQUAL(double(kint64max), val.asDouble());
JSONTEST_ASSERT_EQUAL(float(kint64max), val.asFloat());
JSONTEST_ASSERT_EQUAL(true, val.asBool());
JSONTEST_ASSERT_STRING_EQUAL("9.22337204e18", val.asString());
JSONTEST_ASSERT_STRING_EQUAL("9.22337e+18", val.asString());

// int64 min
val = Json::Value(double(kint64min));
Expand All @@ -716,7 +716,7 @@ JSONTEST_FIXTURE( ValueTest, integers )
JSONTEST_ASSERT_EQUAL(double(kint64min), val.asDouble());
JSONTEST_ASSERT_EQUAL(float(kint64min), val.asFloat());
JSONTEST_ASSERT_EQUAL(true, val.asBool());
JSONTEST_ASSERT_STRING_EQUAL("-9.22337204e18", val.asString());
JSONTEST_ASSERT_STRING_EQUAL("-9.22337e+18", val.asString());

// uint64 max
val = Json::Value(double(kuint64max));
Expand All @@ -735,7 +735,7 @@ JSONTEST_FIXTURE( ValueTest, integers )
JSONTEST_ASSERT_EQUAL(double(kuint64max), val.asDouble());
JSONTEST_ASSERT_EQUAL(float(kuint64max), val.asFloat());
JSONTEST_ASSERT_EQUAL(true, val.asBool());
JSONTEST_ASSERT_STRING_EQUAL("1.84467441e19", val.asString());
JSONTEST_ASSERT_STRING_EQUAL("1.84467e+19", val.asString());
#else // ifdef JSON_NO_INT64
// 2^40 (signed constructor arg)
val = Json::Value(1LL << 40);
Expand Down

0 comments on commit a2fb7fb

Please sign in to comment.