From 77284a476342422d48cd0077866819a9755ab96c Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 22 Nov 2024 11:25:51 +0100 Subject: [PATCH] :bug: make SAX output locale-independent #4084 --- tests/src/unit-locale-cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/unit-locale-cpp.cpp b/tests/src/unit-locale-cpp.cpp index 00655ec51..846b450c6 100644 --- a/tests/src/unit-locale-cpp.cpp +++ b/tests/src/unit-locale-cpp.cpp @@ -114,7 +114,7 @@ TEST_CASE("locale-dependent test (LC_NUMERIC=C)") SECTION("check if locale is properly set") { std::array buffer = {}; - CHECK(std::snprintf(buffer.data(), buffer.size(), "%.2f", 12.34) == 5); // NOLINT(cppcoreguidelines-pro-type-vararg) + CHECK(std::snprintf(buffer.data(), buffer.size(), "%.2f", 12.34) == 5); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) CHECK(std::string(buffer.data()) == "12.34"); } @@ -138,7 +138,7 @@ TEST_CASE("locale-dependent test (LC_NUMERIC=de_DE)") SECTION("check if locale is properly set") { std::array buffer = {}; - CHECK(std::snprintf(buffer.data(), buffer.size(), "%.2f", 12.34) == 5); // NOLINT(cppcoreguidelines-pro-type-vararg) + CHECK(std::snprintf(buffer.data(), buffer.size(), "%.2f", 12.34) == 5); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) CHECK(std::string(buffer.data()) == "12,34"); }