From 4bff3defa87e73ebc04f21671f9543e5b8e744a2 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 10 May 2020 23:13:36 +0200 Subject: [PATCH] LibC: strtod accuracy tests no longer need to skip --- Tests/LibC/accuracy-strtod.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Tests/LibC/accuracy-strtod.cpp b/Tests/LibC/accuracy-strtod.cpp index 92de165fbb..b5cb8d77cc 100644 --- a/Tests/LibC/accuracy-strtod.cpp +++ b/Tests/LibC/accuracy-strtod.cpp @@ -44,7 +44,6 @@ struct Testcase { int should_consume; const char* hex; const char* test_string; - bool skip_old = false; }; static Testcase TESTCASES[] = { @@ -64,9 +63,9 @@ static Testcase TESTCASES[] = { // Exponent overflow: { "BW09", -1, "0000000000000000", "1e-4294967296" }, // Excessive time use(!): - { "BW10", -1, "0000000000000000", "1e-999999999", true }, + { "BW10", -1, "0000000000000000", "1e-999999999" }, // Excessively large exponent (>64 bits): - { "BW10", -1, "0000000000000000", "1e-9999999999999999999999", true }, + { "BW10", -1, "0000000000000000", "1e-9999999999999999999999" }, // Bugs I nearly introduced { "BWN01", 2, "3ff0000000000000", "1.-2" }, @@ -81,8 +80,8 @@ static Testcase TESTCASES[] = { { "BWN10", 6, "4034000000000000", "2e0001" }, { "BWN11", 6, "41ddcd6500000000", "2e0009" }, { "BWN12", 1, "0000000000000000", "0d1" }, - { "BWN13", -1, "7ff0000000000000", "184467440737095516151234567890e2147483639", true }, - { "BWN14", -1, "0000000000000000", ".1234567890e-2147483639", true }, + { "BWN13", -1, "7ff0000000000000", "184467440737095516151234567890e2147483639" }, + { "BWN14", -1, "0000000000000000", ".1234567890e-2147483639" }, { "BWN15", -1, "8000000000000000", "-1e-9999" }, { "BWN16", -1, "c3389e56ee5e7a58", "-6929495644600919.5" }, { "BWN17", -1, "c3389e56ee5e7a57", "-6929495644600919" }, @@ -365,11 +364,7 @@ int main() long long expect_ll = hex_to_ll(tc.hex); bool success = false; - if (tc.skip_old) { - printf(" %s_____(skip)_____%s(__)", TEXT_WRONG, TEXT_RESET); - } else { - success = is_strtod_close(strtod, tc.test_string, tc.hex, tc.should_consume, expect_ll); - } + success = is_strtod_close(strtod, tc.test_string, tc.hex, tc.should_consume, expect_ll); printf(" from %s\n", tc.test_string); if (success) {