From f12d1ac577f5e58bd1f4ab6a611158943e65f2ae Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Wed, 30 Mar 2022 15:45:22 +0200 Subject: [PATCH] Refactor assertion and remove redundant local variable --- test/src/unit-regression1.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/src/unit-regression1.cpp b/test/src/unit-regression1.cpp index bc29bf9fc..78b1eee60 100644 --- a/test/src/unit-regression1.cpp +++ b/test/src/unit-regression1.cpp @@ -1411,13 +1411,8 @@ TEST_CASE("regression tests 1") auto p1 = R"([{"op": "move", "from": "/one/two/three", "path": "/a/b/c"}])"_json; - CHECK_THROWS_AS(model.patch(p1), json::out_of_range&); - - auto p2 = R"([{"op": "move", - "from": "/one/two/three", - "path": "/a/b/c"}])"_json; - CHECK_THROWS_WITH(model.patch(p2), - "[json.exception.out_of_range.403] key 'a' not found"); + CHECK_THROWS_WITH_AS(model.patch(p1), + "[json.exception.out_of_range.403] key 'a' not found", json::out_of_range&); auto p3 = R"([{"op": "copy", "from": "/one/two/three",