summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch')
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch b/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch
new file mode 100644
index 0000000000..463912e4b6
--- /dev/null
+++ b/meta-oe/recipes-devtools/nlohmann-json/files/0001-tests-unit-iterators2-use-std-ranges-equals-for-rang.patch
@@ -0,0 +1,31 @@
1From 660d0b58565073975d6f5d94365d6cbf150a4cf8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
3Date: Sun, 5 Mar 2023 14:11:22 +0100
4Subject: [PATCH] tests/unit-iterators2: use std::ranges::equals for range
5 comparisons (#3950)
6
7Closes https://github.com/nlohmann/json/issues/3927
8
9Upstream-Status: Backport [https://github.com/nlohmann/json/commit/660d0b58565073975d6f5d94365d6cbf150a4cf8]
10
11Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
12---
13 tests/src/unit-iterators2.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/tests/src/unit-iterators2.cpp b/tests/src/unit-iterators2.cpp
17index 27926084..72a5d9dc 100644
18--- a/tests/src/unit-iterators2.cpp
19+++ b/tests/src/unit-iterators2.cpp
20@@ -943,7 +943,7 @@ TEST_CASE("iterators 2")
21 json j_expected{5, 4, 3, 2, 1};
22
23 auto reversed = j | std::views::reverse;
24- CHECK(reversed == j_expected);
25+ CHECK(std::ranges::equal(reversed, j_expected));
26 }
27
28 SECTION("transform")
29--
302.25.1
31