mirror of
https://github.com/nlohmann/json.git
synced 2026-10-18 12:08:12 +00:00
Skip the literal fast path test without exceptions
The test case compares the error messages of both lexer paths, so it does not compile with JSON_NOEXCEPTION (the caught exception does not exist). Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 file changed
+4
@@ -600,6 +600,9 @@ TEST_CASE("lexer number fast path")
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(JSON_NOEXCEPTION)
|
||||||
|
// this test case compares the errors of both lexer paths, which abort when
|
||||||
|
// exceptions are off
|
||||||
TEST_CASE("lexer literal fast path")
|
TEST_CASE("lexer literal fast path")
|
||||||
{
|
{
|
||||||
// For contiguous input, the rest of a literal is compared at once, and a
|
// For contiguous input, the rest of a literal is compared at once, and a
|
||||||
@@ -656,6 +659,7 @@ TEST_CASE("lexer literal fast path")
|
|||||||
CAPTURE(mismatches)
|
CAPTURE(mismatches)
|
||||||
CHECK(mismatches.empty());
|
CHECK(mismatches.empty());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
TEST_CASE("lexer string fast path")
|
TEST_CASE("lexer string fast path")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user