From 0e809e363beb0a455ed7fb60e30106b42e0184b9 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 17 Oct 2026 09:31:40 +0200 Subject: [PATCH] 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 --- tests/src/unit-class_lexer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/unit-class_lexer.cpp b/tests/src/unit-class_lexer.cpp index ad3e8d434..fac88687f 100644 --- a/tests/src/unit-class_lexer.cpp +++ b/tests/src/unit-class_lexer.cpp @@ -600,6 +600,9 @@ TEST_CASE("lexer number fast path") #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") { // 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) CHECK(mismatches.empty()); } +#endif TEST_CASE("lexer string fast path") {