From d9d9aaba84b34527fa8d0a8bc277ef5e5b0abff8 Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Thu, 17 Mar 2022 10:19:39 +0100 Subject: [PATCH] Refactor assertions in unit-algorithms.cpp --- test/src/unit-algorithms.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/src/unit-algorithms.cpp b/test/src/unit-algorithms.cpp index 36f02e11e..5fa860660 100644 --- a/test/src/unit-algorithms.cpp +++ b/test/src/unit-algorithms.cpp @@ -241,9 +241,7 @@ TEST_CASE("algorithms") SECTION("sorting an object") { json j({{"one", 1}, {"two", 2}}); - CHECK_THROWS_AS(std::sort(j.begin(), j.end()), json::invalid_iterator&); - CHECK_THROWS_WITH(std::sort(j.begin(), j.end()), - "[json.exception.invalid_iterator.209] cannot use offsets with object iterators"); + CHECK_THROWS_WITH_AS(std::sort(j.begin(), j.end()), "[json.exception.invalid_iterator.209] cannot use offsets with object iterators", json::invalid_iterator&); } }