Skip the digit accumulation checks without exceptions

The section compares error messages from both lexer paths and parses
out-of-range numbers, so it does not compile (the caught exception does not
exist) and would abort with JSON_NOEXCEPTION.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-17 08:29:49 +02:00
1 parent 81ca04f3ec
commit 722b2c4334
1 file changed
+3
+3
View File
@@ -335,6 +335,8 @@ TEST_CASE("lexer number fast path")
}
}
#if !defined(JSON_NOEXCEPTION)
// this section reports parse errors, which abort when exceptions are off
SECTION("digits accumulated while scanning")
{
// The fast path accumulates the digits while it validates them, eight
@@ -413,6 +415,7 @@ TEST_CASE("lexer number fast path")
}
}
}
#endif
SECTION("integers that do not fit a narrower type become floats")
{