From 21c89352691b1aed59939c9068564e307c037a52 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 27 Sep 2026 22:00:34 +0200 Subject: [PATCH] Check the JSON Pointer roundtrip for every code point again Sampling every 64th element of all_unicode.json gave up the claim that every code point is tested for a small saving; the stringstream removal keeps most of the speedup. Signed-off-by: Niels Lohmann --- tests/src/unit-unicode1.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/src/unit-unicode1.cpp b/tests/src/unit-unicode1.cpp index ba20302fa..e30f1c5d7 100644 --- a/tests/src/unit-unicode1.cpp +++ b/tests/src/unit-unicode1.cpp @@ -170,9 +170,6 @@ TEST_CASE("Unicode (1/5)" * doctest::skip()) SECTION("check JSON Pointers") { - // escaping only treats '~' and '/' specially, so every 64th - // element plus those two characters suffices (#5418) - std::size_t index = 0; for (const auto& s : j) { // skip non-string JSON values @@ -183,11 +180,6 @@ TEST_CASE("Unicode (1/5)" * doctest::skip()) auto ptr = s.get(); - if (index++ % 64 != 0 && ptr != "~" && ptr != "/") - { - continue; - } - // tilde must be followed by 0 or 1 if (ptr == "~") {