mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-27 19:10:24 +01:00
Fix a bug in dtoa
This previously affects Writer:: SetMaxDecimalPlaces()
This commit is contained in:
@@ -81,6 +81,12 @@ TEST(dtoa, maxDecimalPlaces) {
|
||||
TEST_DTOA(3, 2.225073858507201e-308, "0.0"); // Max subnormal positive double
|
||||
TEST_DTOA(3, 2.2250738585072014e-308, "0.0"); // Min normal positive double
|
||||
TEST_DTOA(3, 1.7976931348623157e308, "1.7976931348623157e308"); // Max double
|
||||
TEST_DTOA(5, -0.14000000000000001, "-0.14");
|
||||
TEST_DTOA(4, -0.14000000000000001, "-0.14");
|
||||
TEST_DTOA(3, -0.14000000000000001, "-0.14");
|
||||
TEST_DTOA(3, -0.10000000000000001, "-0.1");
|
||||
TEST_DTOA(2, -0.10000000000000001, "-0.1");
|
||||
TEST_DTOA(1, -0.10000000000000001, "-0.1");
|
||||
|
||||
#undef TEST_DTOA
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user