From c4c1820c472007d8c670c5b5da6bdaa6228211b4 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Thu, 22 May 2025 12:31:41 +0200 Subject: [PATCH] # This is a combination of 5 commits. # This is the 1st commit message: :white_check_mark: add test for #4440 Signed-off-by: Niels Lohmann # Conflicts: # tests/src/unit-regression2.cpp # This is the commit message #2: :white_check_mark: add test for #4440 # This is the commit message #3: :white_check_mark: add test for #4440 # This is the commit message #4: :white_check_mark: add test for #4440 # This is the commit message #5: :white_check_mark: add test for #4440 Signed-off-by: Niels Lohmann --- tests/src/unit-regression2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/unit-regression2.cpp b/tests/src/unit-regression2.cpp index ba95b224d..99ee6f4d5 100644 --- a/tests/src/unit-regression2.cpp +++ b/tests/src/unit-regression2.cpp @@ -1104,13 +1104,13 @@ TEST_CASE("regression tests 2") #if JSON_HAS_RANGES == 1 SECTION("issue 4440") { - auto noOpFilter = std::views::filter([](auto&&) + auto noOpFilter = std::views::filter([](auto&&) noexcept { return true; }); json j = {1, 2, 3}; auto filtered = j | noOpFilter; - CHECK(j == *filtered.begin()); + CHECK(*filtered.begin() == 1); } #endif }