From f290b36ad24af1d05c57af8b62111729bb374021 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 25 Sep 2026 08:23:53 +0200 Subject: [PATCH] Fix CI: use VS 2026 on windows-11-arm and use raw string literals in tests (#5575) The windows-11-arm runner image moved to windows-11-vs2026-arm64, which no longer ships Visual Studio 2022, so the msvc-arm64 job failed at configure time. Use the "Visual Studio 18 2026" generator like the msvc2026 job. clang-tidy's modernize-raw-string-literal check flagged two string literals in the nesting tests added by #5546 and #5547. Signed-off-by: Niels Lohmann --- .github/workflows/windows.yml | 4 ++-- tests/src/unit-merge_patch.cpp | 2 +- tests/src/unit-modifiers.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 99a8aa3ca..ea742773f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -124,11 +124,11 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Run CMake (Release) - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ARM64 -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX" + run: cmake -S . -B build -G "Visual Studio 18 2026" -A ARM64 -DJSON_BuildTests=On -DCMAKE_CXX_FLAGS="/W4 /WX" if: matrix.build_type == 'Release' shell: pwsh - name: Run CMake (Debug) - run: cmake -S . -B build -G "Visual Studio 17 2022" -A ARM64 -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX" + run: cmake -S . -B build -G "Visual Studio 18 2026" -A ARM64 -DJSON_BuildTests=On -DJSON_FastTests=ON -DCMAKE_CXX_FLAGS="/W4 /WX" if: matrix.build_type == 'Debug' shell: pwsh - name: Build diff --git a/tests/src/unit-merge_patch.cpp b/tests/src/unit-merge_patch.cpp index 8ac281ef5..c9741e85b 100644 --- a/tests/src/unit-merge_patch.cpp +++ b/tests/src/unit-merge_patch.cpp @@ -62,7 +62,7 @@ std::string nested_objects(const std::size_t depth, const int variant) } text += "\"a\":"; } - text += variant == 1 ? "{\"x\":1,\"y\":null}" : "{\"y\":2}"; + text += variant == 1 ? R"({"x":1,"y":null})" : "{\"y\":2}"; text.append(depth, '}'); return text; } diff --git a/tests/src/unit-modifiers.cpp b/tests/src/unit-modifiers.cpp index 55f9d467e..c878ec15c 100644 --- a/tests/src/unit-modifiers.cpp +++ b/tests/src/unit-modifiers.cpp @@ -48,7 +48,7 @@ std::string nested_objects(const std::size_t depth, const int variant) if (variant == 2 && i % 5 == 0) { // an object replacing a primitive, which is not merged - text += "\"s0\":{\"o\":1},"; + text += R"("s0":{"o":1},)"; } text += "\"a\":"; }