mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 19:52:02 +01:00
Fix parsing numbers which are less than 1e-308
Overflow should check sign of exponent.
This commit is contained in:
@@ -137,6 +137,7 @@ TEST(Reader, ParseNumberHandler) {
|
||||
TEST_DOUBLE("2.22507e-308", 2.22507e-308);
|
||||
TEST_DOUBLE("-1.79769e+308", -1.79769e+308);
|
||||
TEST_DOUBLE("-2.22507e-308", -2.22507e-308);
|
||||
TEST_DOUBLE("4.9406564584124654e-324", 4.9406564584124654e-324); // minimum denormal
|
||||
TEST_DOUBLE("18446744073709551616", 18446744073709551616.0); // 2^64 (max of uint64_t + 1, force to use double)
|
||||
TEST_DOUBLE("-9223372036854775809", -9223372036854775809.0); // -2^63 - 1(min of int64_t + 1, force to use double)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user