mirror of
https://github.com/nlohmann/json.git
synced 2026-09-06 16:27:59 +00:00
Avoid temporary-string concatenation flagged by clang-tidy in the differential test
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user