From fae71067acd5439ec7b11d47f55bd99e6e3bbc65 Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Thu, 28 Mar 2024 03:17:41 +0000 Subject: [PATCH] fix csubstr.first_real_span() when the exponent only has one digit re biojppm/rapidyaml#390 --- src/c4/substr.hpp | 15 +-- test/test_substr.cpp | 282 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 287 insertions(+), 10 deletions(-) diff --git a/src/c4/substr.hpp b/src/c4/substr.hpp index 254f4b5e..ff51b15f 100644 --- a/src/c4/substr.hpp +++ b/src/c4/substr.hpp @@ -1211,7 +1211,7 @@ struct C4CORE_EXPORT basic_substring basic_substring ne = first_non_empty_span(); if(ne.empty()) return ne; - size_t skip_start = (ne.str[0] == '+' || ne.str[0] == '-'); + const size_t skip_start = (ne.str[0] == '+' || ne.str[0] == '-'); C4_ASSERT(skip_start == 0 || skip_start == 1); // if we have at least three digits after the leading sign, it // can be decimal, or hex, or bin or oct. Ex: @@ -1351,14 +1351,11 @@ struct C4CORE_EXPORT basic_substring power_part_dec: C4_ASSERT(pos > 0); C4_ASSERT(str[pos - 1] == 'e' || str[pos - 1] == 'E'); - // either a + or a - is expected here, followed by more chars. - // also, using (pos+1) in this check will cause an early - // return when no more chars follow the sign. - if(len <= (pos+1) || ((!intchars) && (!fracchars))) + // either digits, or +, or - are expected here, followed by more digits. + if((len == pos) || ((!intchars) && (!fracchars))) return first(0); - ++pos; // this was the sign. - // ... so the (pos+1) ensures that we enter the loop and - // hence that there exist chars in the power part + if(str[pos] == '-' || str[pos] == '+') + ++pos; // skip the sign powchars = false; for( ; pos < len; ++pos) { @@ -1370,7 +1367,7 @@ struct C4CORE_EXPORT basic_substring else return first(0); } - return *this; + return powchars ? *this : first(0); } // this function is declared inside the class to avoid a VS error with __declspec(dllimport) diff --git a/test/test_substr.cpp b/test/test_substr.cpp index 84699724..3c777e55 100644 --- a/test/test_substr.cpp +++ b/test/test_substr.cpp @@ -1711,6 +1711,20 @@ TEST_CASE("substr.first_real_span") CHECK_EQ(csubstr("0").first_real_span(), "0"); CHECK_EQ(csubstr("+0").first_real_span(), "+0"); CHECK_EQ(csubstr("-0").first_real_span(), "-0"); + CHECK_EQ(csubstr("1.").first_real_span(), "1."); + CHECK_EQ(csubstr("+1.").first_real_span(), "+1."); + CHECK_EQ(csubstr("-1.").first_real_span(), "-1."); + CHECK_EQ(csubstr("-0.").first_real_span(), "-0."); + CHECK_EQ(csubstr("0.").first_real_span(), "0."); + CHECK_EQ(csubstr("+0.").first_real_span(), "+0."); + CHECK_EQ(csubstr("-0.").first_real_span(), "-0."); + CHECK_EQ(csubstr("1.2").first_real_span(), "1.2"); + CHECK_EQ(csubstr("+1.2").first_real_span(), "+1.2"); + CHECK_EQ(csubstr("-1.2").first_real_span(), "-1.2"); + CHECK_EQ(csubstr("-0.2").first_real_span(), "-0.2"); + CHECK_EQ(csubstr("0.2").first_real_span(), "0.2"); + CHECK_EQ(csubstr("+0.2").first_real_span(), "+0.2"); + CHECK_EQ(csubstr("-0.2").first_real_span(), "-0.2"); CHECK_EQ(csubstr("1234 abc").first_real_span(), "1234"); CHECK_EQ(csubstr("abc 1234 abc").first_real_span(), ""); CHECK_EQ(csubstr("+0x1234 abc").first_real_span(), "+0x1234"); @@ -1755,15 +1769,120 @@ TEST_CASE("substr.first_real_span") CHECK_EQ(csubstr("+0o").first_real_span(), ""); CHECK_EQ(csubstr("-0o").first_real_span(), ""); CHECK_EQ(csubstr("-1.234 asdkjh").first_real_span(), "-1.234"); -// CHECK_EQ(csubstr("-1.234e5 asdkjh").first_real_span(), "-1.234e5"); + CHECK_EQ(csubstr("-1.234e5 asdkjh").first_real_span(), "-1.234e5"); + CHECK_EQ(csubstr("-1.234E5 asdkjh").first_real_span(), "-1.234E5"); CHECK_EQ(csubstr("-1.234e+5 asdkjh").first_real_span(), "-1.234e+5"); + CHECK_EQ(csubstr("-1.234E+5 asdkjh").first_real_span(), "-1.234E+5"); CHECK_EQ(csubstr("-1.234e-5 asdkjh").first_real_span(), "-1.234e-5"); + CHECK_EQ(csubstr("-1.234E-5 asdkjh").first_real_span(), "-1.234E-5"); + CHECK_EQ(csubstr("9.5e7 asdkjh").first_real_span(), "9.5e7"); + CHECK_EQ(csubstr("9.5E7 asdkjh").first_real_span(), "9.5E7"); + CHECK_EQ(csubstr("9.5e+7 asdkjh").first_real_span(), "9.5e+7"); + CHECK_EQ(csubstr("9.5E+7 asdkjh").first_real_span(), "9.5E+7"); + CHECK_EQ(csubstr("9.5e-7 asdkjh").first_real_span(), "9.5e-7"); + CHECK_EQ(csubstr("9.5E-7 asdkjh").first_real_span(), "9.5E-7"); + CHECK_EQ(csubstr("-9.5e7 asdkjh").first_real_span(), "-9.5e7"); + CHECK_EQ(csubstr("-9.5E7 asdkjh").first_real_span(), "-9.5E7"); + CHECK_EQ(csubstr("-9.5e+7 asdkjh").first_real_span(), "-9.5e+7"); + CHECK_EQ(csubstr("-9.5E+7 asdkjh").first_real_span(), "-9.5E+7"); + CHECK_EQ(csubstr("-9.5e-7 asdkjh").first_real_span(), "-9.5e-7"); + CHECK_EQ(csubstr("-9.5E-7 asdkjh").first_real_span(), "-9.5E-7"); + CHECK_EQ(csubstr("+9.5e7 asdkjh").first_real_span(), "+9.5e7"); + CHECK_EQ(csubstr("+9.5E7 asdkjh").first_real_span(), "+9.5E7"); + CHECK_EQ(csubstr("+9.5e+7 asdkjh").first_real_span(), "+9.5e+7"); + CHECK_EQ(csubstr("+9.5E+7 asdkjh").first_real_span(), "+9.5E+7"); + CHECK_EQ(csubstr("+9.5e-7 asdkjh").first_real_span(), "+9.5e-7"); + CHECK_EQ(csubstr("+9.5E-7 asdkjh").first_real_span(), "+9.5E-7"); + CHECK_EQ(csubstr("9.5e17 asdkjh").first_real_span(), "9.5e17"); + CHECK_EQ(csubstr("9.5E17 asdkjh").first_real_span(), "9.5E17"); + CHECK_EQ(csubstr("9.5e+17 asdkjh").first_real_span(), "9.5e+17"); + CHECK_EQ(csubstr("9.5E+17 asdkjh").first_real_span(), "9.5E+17"); + CHECK_EQ(csubstr("9.5e-17 asdkjh").first_real_span(), "9.5e-17"); + CHECK_EQ(csubstr("9.5E-17 asdkjh").first_real_span(), "9.5E-17"); + CHECK_EQ(csubstr("-9.5e17 asdkjh").first_real_span(), "-9.5e17"); + CHECK_EQ(csubstr("-9.5E17 asdkjh").first_real_span(), "-9.5E17"); + CHECK_EQ(csubstr("-9.5e+17 asdkjh").first_real_span(), "-9.5e+17"); + CHECK_EQ(csubstr("-9.5E+17 asdkjh").first_real_span(), "-9.5E+17"); + CHECK_EQ(csubstr("-9.5e-17 asdkjh").first_real_span(), "-9.5e-17"); + CHECK_EQ(csubstr("-9.5E-17 asdkjh").first_real_span(), "-9.5E-17"); + CHECK_EQ(csubstr("+9.5e17 asdkjh").first_real_span(), "+9.5e17"); + CHECK_EQ(csubstr("+9.5E17 asdkjh").first_real_span(), "+9.5E17"); + CHECK_EQ(csubstr("+9.5e+17 asdkjh").first_real_span(), "+9.5e+17"); + CHECK_EQ(csubstr("+9.5E+17 asdkjh").first_real_span(), "+9.5E+17"); + CHECK_EQ(csubstr("+9.5e-17 asdkjh").first_real_span(), "+9.5e-17"); + CHECK_EQ(csubstr("+9.5E-17 asdkjh").first_real_span(), "+9.5E-17"); + CHECK_EQ(csubstr("129.532e7 asdkjh").first_real_span(), "129.532e7"); + CHECK_EQ(csubstr("129.532E7 asdkjh").first_real_span(), "129.532E7"); + CHECK_EQ(csubstr("129.532e+7 asdkjh").first_real_span(), "129.532e+7"); + CHECK_EQ(csubstr("129.532E+7 asdkjh").first_real_span(), "129.532E+7"); + CHECK_EQ(csubstr("129.532e-7 asdkjh").first_real_span(), "129.532e-7"); + CHECK_EQ(csubstr("129.532E-7 asdkjh").first_real_span(), "129.532E-7"); + CHECK_EQ(csubstr("-129.532e7 asdkjh").first_real_span(), "-129.532e7"); + CHECK_EQ(csubstr("-129.532E7 asdkjh").first_real_span(), "-129.532E7"); + CHECK_EQ(csubstr("-129.532e+7 asdkjh").first_real_span(), "-129.532e+7"); + CHECK_EQ(csubstr("-129.532E+7 asdkjh").first_real_span(), "-129.532E+7"); + CHECK_EQ(csubstr("-129.532e-7 asdkjh").first_real_span(), "-129.532e-7"); + CHECK_EQ(csubstr("-129.532E-7 asdkjh").first_real_span(), "-129.532E-7"); + CHECK_EQ(csubstr("+129.532e7 asdkjh").first_real_span(), "+129.532e7"); + CHECK_EQ(csubstr("+129.532E7 asdkjh").first_real_span(), "+129.532E7"); + CHECK_EQ(csubstr("+129.532e+7 asdkjh").first_real_span(), "+129.532e+7"); + CHECK_EQ(csubstr("+129.532E+7 asdkjh").first_real_span(), "+129.532E+7"); + CHECK_EQ(csubstr("+129.532e-7 asdkjh").first_real_span(), "+129.532e-7"); + CHECK_EQ(csubstr("+129.532E-7 asdkjh").first_real_span(), "+129.532E-7"); + CHECK_EQ(csubstr("129.532e17 asdkjh").first_real_span(), "129.532e17"); + CHECK_EQ(csubstr("129.532E17 asdkjh").first_real_span(), "129.532E17"); + CHECK_EQ(csubstr("129.532e+17 asdkjh").first_real_span(), "129.532e+17"); + CHECK_EQ(csubstr("129.532E+17 asdkjh").first_real_span(), "129.532E+17"); + CHECK_EQ(csubstr("129.532e-17 asdkjh").first_real_span(), "129.532e-17"); + CHECK_EQ(csubstr("129.532E-17 asdkjh").first_real_span(), "129.532E-17"); + CHECK_EQ(csubstr("-129.532e17 asdkjh").first_real_span(), "-129.532e17"); + CHECK_EQ(csubstr("-129.532E17 asdkjh").first_real_span(), "-129.532E17"); + CHECK_EQ(csubstr("-129.532e+17 asdkjh").first_real_span(), "-129.532e+17"); + CHECK_EQ(csubstr("-129.532E+17 asdkjh").first_real_span(), "-129.532E+17"); + CHECK_EQ(csubstr("-129.532e-17 asdkjh").first_real_span(), "-129.532e-17"); + CHECK_EQ(csubstr("-129.532E-17 asdkjh").first_real_span(), "-129.532E-17"); + CHECK_EQ(csubstr("+129.532e17 asdkjh").first_real_span(), "+129.532e17"); + CHECK_EQ(csubstr("+129.532E17 asdkjh").first_real_span(), "+129.532E17"); + CHECK_EQ(csubstr("+129.532e+17 asdkjh").first_real_span(), "+129.532e+17"); + CHECK_EQ(csubstr("+129.532E+17 asdkjh").first_real_span(), "+129.532E+17"); + CHECK_EQ(csubstr("+129.532e-17 asdkjh").first_real_span(), "+129.532e-17"); + CHECK_EQ(csubstr("+129.532E-17 asdkjh").first_real_span(), "+129.532E-17"); + CHECK_EQ(csubstr("129.532e asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("129.532E asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("129.532e+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("129.532E+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("129.532e- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("129.532E- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532e asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532E asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532e+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532E+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532e- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-129.532E- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532e asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532E asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532e+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532E+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532e- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+129.532E- asdkjh").first_real_span(), ""); CHECK_EQ(csubstr("0x1.e8480p+19 asdkjh").first_real_span(), "0x1.e8480p+19"); CHECK_EQ(csubstr("0x1.e8480p-19 asdkjh").first_real_span(), "0x1.e8480p-19"); CHECK_EQ(csubstr("-0x1.e8480p+19 asdkjh").first_real_span(), "-0x1.e8480p+19"); CHECK_EQ(csubstr("-0x1.e8480p-19 asdkjh").first_real_span(), "-0x1.e8480p-19"); CHECK_EQ(csubstr("+0x1.e8480p+19 asdkjh").first_real_span(), "+0x1.e8480p+19"); CHECK_EQ(csubstr("+0x1.e8480p-19 asdkjh").first_real_span(), "+0x1.e8480p-19"); + CHECK_EQ(csubstr("0x1.e8480p+1 asdkjh").first_real_span(), "0x1.e8480p+1"); + CHECK_EQ(csubstr("0x1.e8480p-1 asdkjh").first_real_span(), "0x1.e8480p-1"); + CHECK_EQ(csubstr("-0x1.e8480p+1 asdkjh").first_real_span(), "-0x1.e8480p+1"); + CHECK_EQ(csubstr("-0x1.e8480p-1 asdkjh").first_real_span(), "-0x1.e8480p-1"); + CHECK_EQ(csubstr("+0x1.e8480p+1 asdkjh").first_real_span(), "+0x1.e8480p+1"); + CHECK_EQ(csubstr("+0x1.e8480p-1 asdkjh").first_real_span(), "+0x1.e8480p-1"); + CHECK_EQ(csubstr("0x1.e8480p+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("0x1.e8480p- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-0x1.e8480p+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("-0x1.e8480p- asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+0x1.e8480p+ asdkjh").first_real_span(), ""); + CHECK_EQ(csubstr("+0x1.e8480p- asdkjh").first_real_span(), ""); CHECK_EQ(csubstr("infinity").first_real_span(), "infinity"); CHECK_EQ(csubstr(" infinity").first_real_span(), "infinity"); CHECK_EQ(csubstr("-infinity").first_real_span(), "-infinity"); @@ -2210,6 +2329,88 @@ TEST_CASE("substr.is_real") CHECK_UNARY(csubstr("0.1").is_real()); CHECK_UNARY(csubstr("-0.1").is_real()); } + SUBCASE("scientific") + { + CHECK_UNARY(csubstr("-1.234").is_real()); + CHECK_UNARY(csubstr("-1.234e5").is_real()); + CHECK_UNARY(csubstr("-1.234E5").is_real()); + CHECK_UNARY(csubstr("-1.234e+5").is_real()); + CHECK_UNARY(csubstr("-1.234E+5").is_real()); + CHECK_UNARY(csubstr("-1.234e-5").is_real()); + CHECK_UNARY(csubstr("-1.234E-5").is_real()); + CHECK_UNARY(csubstr("9.5e7").is_real()); + CHECK_UNARY(csubstr("9.5E7").is_real()); + CHECK_UNARY(csubstr("9.5e+7").is_real()); + CHECK_UNARY(csubstr("9.5E+7").is_real()); + CHECK_UNARY(csubstr("9.5e-7").is_real()); + CHECK_UNARY(csubstr("9.5E-7").is_real()); + CHECK_UNARY(csubstr("-9.5e7").is_real()); + CHECK_UNARY(csubstr("-9.5E7").is_real()); + CHECK_UNARY(csubstr("-9.5e+7").is_real()); + CHECK_UNARY(csubstr("-9.5E+7").is_real()); + CHECK_UNARY(csubstr("-9.5e-7").is_real()); + CHECK_UNARY(csubstr("-9.5E-7").is_real()); + CHECK_UNARY(csubstr("+9.5e7").is_real()); + CHECK_UNARY(csubstr("+9.5E7").is_real()); + CHECK_UNARY(csubstr("+9.5e+7").is_real()); + CHECK_UNARY(csubstr("+9.5E+7").is_real()); + CHECK_UNARY(csubstr("+9.5e-7").is_real()); + CHECK_UNARY(csubstr("+9.5E-7").is_real()); + CHECK_UNARY(csubstr("9.5e17").is_real()); + CHECK_UNARY(csubstr("9.5E17").is_real()); + CHECK_UNARY(csubstr("9.5e+17").is_real()); + CHECK_UNARY(csubstr("9.5E+17").is_real()); + CHECK_UNARY(csubstr("9.5e-17").is_real()); + CHECK_UNARY(csubstr("9.5E-17").is_real()); + CHECK_UNARY(csubstr("-9.5e17").is_real()); + CHECK_UNARY(csubstr("-9.5E17").is_real()); + CHECK_UNARY(csubstr("-9.5e+17").is_real()); + CHECK_UNARY(csubstr("-9.5E+17").is_real()); + CHECK_UNARY(csubstr("-9.5e-17").is_real()); + CHECK_UNARY(csubstr("-9.5E-17").is_real()); + CHECK_UNARY(csubstr("+9.5e17").is_real()); + CHECK_UNARY(csubstr("+9.5E17").is_real()); + CHECK_UNARY(csubstr("+9.5e+17").is_real()); + CHECK_UNARY(csubstr("+9.5E+17").is_real()); + CHECK_UNARY(csubstr("+9.5e-17").is_real()); + CHECK_UNARY(csubstr("+9.5E-17").is_real()); + CHECK_UNARY(csubstr("129.532e7").is_real()); + CHECK_UNARY(csubstr("129.532E7").is_real()); + CHECK_UNARY(csubstr("129.532e+7").is_real()); + CHECK_UNARY(csubstr("129.532E+7").is_real()); + CHECK_UNARY(csubstr("129.532e-7").is_real()); + CHECK_UNARY(csubstr("129.532E-7").is_real()); + CHECK_UNARY(csubstr("-129.532e7").is_real()); + CHECK_UNARY(csubstr("-129.532E7").is_real()); + CHECK_UNARY(csubstr("-129.532e+7").is_real()); + CHECK_UNARY(csubstr("-129.532E+7").is_real()); + CHECK_UNARY(csubstr("-129.532e-7").is_real()); + CHECK_UNARY(csubstr("-129.532E-7").is_real()); + CHECK_UNARY(csubstr("+129.532e7").is_real()); + CHECK_UNARY(csubstr("+129.532E7").is_real()); + CHECK_UNARY(csubstr("+129.532e+7").is_real()); + CHECK_UNARY(csubstr("+129.532E+7").is_real()); + CHECK_UNARY(csubstr("+129.532e-7").is_real()); + CHECK_UNARY(csubstr("+129.532E-7").is_real()); + CHECK_UNARY(csubstr("129.532e17").is_real()); + CHECK_UNARY(csubstr("129.532E17").is_real()); + CHECK_UNARY(csubstr("129.532e+17").is_real()); + CHECK_UNARY(csubstr("129.532E+17").is_real()); + CHECK_UNARY(csubstr("129.532e-17").is_real()); + CHECK_UNARY(csubstr("129.532E-17").is_real()); + CHECK_UNARY(csubstr("-129.532e17").is_real()); + CHECK_UNARY(csubstr("-129.532E17").is_real()); + CHECK_UNARY(csubstr("-129.532e+17").is_real()); + CHECK_UNARY(csubstr("-129.532E+17").is_real()); + CHECK_UNARY(csubstr("-129.532e-17").is_real()); + CHECK_UNARY(csubstr("-129.532E-17").is_real()); + CHECK_UNARY(csubstr("+129.532e17").is_real()); + CHECK_UNARY(csubstr("+129.532E17").is_real()); + CHECK_UNARY(csubstr("+129.532e+17").is_real()); + CHECK_UNARY(csubstr("+129.532E+17").is_real()); + CHECK_UNARY(csubstr("+129.532e-17").is_real()); + CHECK_UNARY(csubstr("+129.532E-17").is_real()); + } SUBCASE("hexadecimal") { CHECK_FALSE(csubstr("0x").is_real()); @@ -2637,6 +2838,85 @@ const number numbers[] = { {"infinity", kIsReal}, {"inf", kIsReal}, {"nan", kIsReal}, + {"-1.234", kIsReal}, + {"-1.234e5", kIsReal}, + {"-1.234E5", kIsReal}, + {"-1.234e+5", kIsReal}, + {"-1.234E+5", kIsReal}, + {"-1.234e-5", kIsReal}, + {"-1.234E-5", kIsReal}, + {"9.5e7", kIsReal}, + {"9.5E7", kIsReal}, + {"9.5e+7", kIsReal}, + {"9.5E+7", kIsReal}, + {"9.5e-7", kIsReal}, + {"9.5E-7", kIsReal}, + {"-9.5e7", kIsReal}, + {"-9.5E7", kIsReal}, + {"-9.5e+7", kIsReal}, + {"-9.5E+7", kIsReal}, + {"-9.5e-7", kIsReal}, + {"-9.5E-7", kIsReal}, + {"+9.5e7", kIsReal}, + {"+9.5E7", kIsReal}, + {"+9.5e+7", kIsReal}, + {"+9.5E+7", kIsReal}, + {"+9.5e-7", kIsReal}, + {"+9.5E-7", kIsReal}, + {"9.5e17", kIsReal}, + {"9.5E17", kIsReal}, + {"9.5e+17", kIsReal}, + {"9.5E+17", kIsReal}, + {"9.5e-17", kIsReal}, + {"9.5E-17", kIsReal}, + {"-9.5e17", kIsReal}, + {"-9.5E17", kIsReal}, + {"-9.5e+17", kIsReal}, + {"-9.5E+17", kIsReal}, + {"-9.5e-17", kIsReal}, + {"-9.5E-17", kIsReal}, + {"+9.5e17", kIsReal}, + {"+9.5E17", kIsReal}, + {"+9.5e+17", kIsReal}, + {"+9.5E+17", kIsReal}, + {"+9.5e-17", kIsReal}, + {"+9.5E-17", kIsReal}, + {"129.532e7", kIsReal}, + {"129.532E7", kIsReal}, + {"129.532e+7", kIsReal}, + {"129.532E+7", kIsReal}, + {"129.532e-7", kIsReal}, + {"129.532E-7", kIsReal}, + {"-129.532e7", kIsReal}, + {"-129.532E7", kIsReal}, + {"-129.532e+7", kIsReal}, + {"-129.532E+7", kIsReal}, + {"-129.532e-7", kIsReal}, + {"-129.532E-7", kIsReal}, + {"+129.532e7", kIsReal}, + {"+129.532E7", kIsReal}, + {"+129.532e+7", kIsReal}, + {"+129.532E+7", kIsReal}, + {"+129.532e-7", kIsReal}, + {"+129.532E-7", kIsReal}, + {"129.532e17", kIsReal}, + {"129.532E17", kIsReal}, + {"129.532e+17", kIsReal}, + {"129.532E+17", kIsReal}, + {"129.532e-17", kIsReal}, + {"129.532E-17", kIsReal}, + {"-129.532e17", kIsReal}, + {"-129.532E17", kIsReal}, + {"-129.532e+17", kIsReal}, + {"-129.532E+17", kIsReal}, + {"-129.532e-17", kIsReal}, + {"-129.532E-17", kIsReal}, + {"+129.532e17", kIsReal}, + {"+129.532E17", kIsReal}, + {"+129.532e+17", kIsReal}, + {"+129.532E+17", kIsReal}, + {"+129.532e-17", kIsReal}, + {"+129.532E-17", kIsReal}, }; TEST_CASE("substr.is_number")