mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-28 20:15:24 +08:00
Specify float constant as float
Otherwise, on some 32 bit platforms this may not fit into long and compilation will fail: src/test_lib_json/main.cpp:1260: error: integer constant is too large for 'long' type
This commit is contained in:
parent
63a961a752
commit
7acfd599f0
@ -1254,7 +1254,7 @@ JSONTEST_FIXTURE(ValueTest, nonIntegers) {
|
||||
|
||||
// A 16-digit floating point number.
|
||||
val = Json::Value(2199023255552000.0f);
|
||||
JSONTEST_ASSERT_EQUAL(float(2199023255552000), val.asFloat());
|
||||
JSONTEST_ASSERT_EQUAL(float(2199023255552000.0f), val.asFloat());
|
||||
JSONTEST_ASSERT_STRING_EQUAL("2199023255552000",
|
||||
normalizeFloatingPointStr(val.asString()));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user