Commit 7101911d authored by abolz's avatar abolz

Run all the new tests in full-precision mode only

until I know what the normal-precision algorithm really does...
parent 319944a1
......@@ -392,15 +392,6 @@ static void TestParseDouble() {
"83723677529752585477247372368372368547354737253685475529752",
6223372036854775808.0);
TEST_DOUBLE(fullPrecision, "1e-325", 0.0);
TEST_DOUBLE(fullPrecision, "1e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2.4703282292062327e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2.4703282292062328e-324", 5e-324);
TEST_DOUBLE(fullPrecision, "2.48e-324",5e-324);
TEST_DOUBLE(fullPrecision, "2.5e-324", 5e-324);
#if 0
// Test (length + exponent) overflow
TEST_DOUBLE(fullPrecision, "0e+2147483647", 0.0);
......@@ -412,6 +403,14 @@ static void TestParseDouble() {
if (fullPrecision)
{
TEST_DOUBLE(fullPrecision, "1e-325", 0.0);
TEST_DOUBLE(fullPrecision, "1e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2.4703282292062327e-324", 0.0);
TEST_DOUBLE(fullPrecision, "2.4703282292062328e-324", 5e-324);
TEST_DOUBLE(fullPrecision, "2.48e-324",5e-324);
TEST_DOUBLE(fullPrecision, "2.5e-324", 5e-324);
// Slightly above max-normal
TEST_DOUBLE(fullPrecision, "1.7976931348623158e+308", 1.7976931348623158e+308);
......@@ -431,8 +430,6 @@ static void TestParseDouble() {
"828481044358810649108367633313557305310641892225870327827273"
"41408256.000000",
2.4354608055603473e+307);
}
// 9007199254740991 * 2^971 (max normal)
TEST_DOUBLE(fullPrecision,
"1.797693134862315708145274237317043567980705675258449965989174768031572607800285"
......@@ -559,10 +556,6 @@ static void TestParseDouble() {
"99999999999999999999999999999999999999999999999999999999999999999999999999999999e-308",
4.450147717014401778e-308 // 0x1.ffffffffffffep-1022
);
#if 0
// XXX:
// https://travis-ci.org/Tencent/rapidjson/jobs/393054531#L1634
// Slightly below half way between max-normal and infinity.
// Should round down.
TEST_DOUBLE(fullPrecision,
......@@ -584,7 +577,7 @@ static void TestParseDouble() {
"99999999999999999999999999999999999999999999999999999999999999999999999999999999e+308",
1.797693134862315708e+308 // 0x1.fffffffffffffp1023
);
#endif
}
#undef TEST_DOUBLE
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment