From 07ac676393e888b3b418a64f499592233f833674 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 31 Oct 2026 07:28:45 +0000 Subject: [PATCH] Fix clang-tidy modernize-use-auto in json_view from_json tests Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01N5NasCxh8jKXBaa6HBx9Xk Signed-off-by: Niels Lohmann --- tests/src/unit-json_view_from_json.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/unit-json_view_from_json.cpp b/tests/src/unit-json_view_from_json.cpp index 85faaf9b6..7690dd86f 100644 --- a/tests/src/unit-json_view_from_json.cpp +++ b/tests/src/unit-json_view_from_json.cpp @@ -502,7 +502,7 @@ TEST_CASE("json_view from_json: string_view members borrow from the document") const std::string text = R"({"name": "hello", "n": 1})"; const json_document d = json_document::parse(text); REQUIRE_FALSE(d.owns_source()); - const named_view r = d.root().get(); + const auto r = d.root().get(); CHECK(r.name == "hello"); CHECK(r.n == 1); CHECK(within(r.name, text)); @@ -514,7 +514,7 @@ TEST_CASE("json_view from_json: string_view members borrow from the document") const std::string text = R"({"name": "a\nb", "n": 2})"; json_document d = json_document::parse(text); REQUIRE_FALSE(d.owns_source()); - const named_view r = d.root().get(); + const auto r = d.root().get(); CHECK(r.name == "a\nb"); CHECK(r.n == 2); CHECK_FALSE(within(r.name, text)); @@ -528,7 +528,7 @@ TEST_CASE("json_view from_json: string_view members borrow from the document") { const json_document d = json_document::parse(std::string(R"({"name": "owned", "n": 3})")); REQUIRE(d.owns_source()); - const named_view r = d.root().get(); + const auto r = d.root().get(); CHECK(r.name == "owned"); CHECK(within(r.name, d.source())); }