mirror of
https://github.com/nlohmann/json.git
synced 2026-10-17 19:48:12 +00:00
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:
1 file changed
+3
@@ -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")
|
SECTION("digits accumulated while scanning")
|
||||||
{
|
{
|
||||||
// The fast path accumulates the digits while it validates them, eight
|
// 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")
|
SECTION("integers that do not fit a narrower type become floats")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user