diff options
author | Milo Yip <miloyip@gmail.com> | 2014-07-30 19:27:17 +0400 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2014-07-30 19:27:17 +0400 |
commit | 808d362b884847567233e95afb33315d9ec81a72 (patch) | |
tree | e8ac0fb91208d647dcdcc8d6ad2ae06522d4a6af /test | |
parent | c4f64e7b02f1af5d309fce6b62a9333c6d64b0cf (diff) |
Fix parsing numbers which are less than 1e-308
Overflow should check sign of exponent.
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest/readertest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unittest/readertest.cpp b/test/unittest/readertest.cpp index 1b71db87..a933981b 100644 --- a/test/unittest/readertest.cpp +++ b/test/unittest/readertest.cpp @@ -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)
|