From 68c698194b4435b64f1db157dc7c0201ad28e3e4 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 6 Sep 2026 11:11:16 +0200 Subject: [PATCH] Avoid temporary-string concatenation flagged by clang-tidy in the differential test Signed-off-by: Niels Lohmann --- tests/src/unit-class_parser.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-class_parser.cpp b/tests/src/unit-class_parser.cpp index 344621f78..90ab51066 100644 --- a/tests/src/unit-class_parser.cpp +++ b/tests/src/unit-class_parser.cpp @@ -1014,7 +1014,11 @@ TEST_CASE("parser class") // wrap in an array so get_token() is exercised beyond the // very first (constructor-time) scan as well - const std::string wrapped = "[" + number + "," + number + "]"; + std::string wrapped = "["; + wrapped += number; + wrapped += ","; + wrapped += number; + wrapped += "]"; CHECK(json::accept(wrapped) == expected); } }