Refactor assertion and remove redundant local variable

This commit is contained in:
Krzysiek Karbowiak 2022-03-30 15:45:22 +02:00
parent 44deb1c508
commit f12d1ac577

View File

@ -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",