From 44deb1c5083e1ef36f0f226a64a8ab45dc88cc17 Mon Sep 17 00:00:00 2001 From: Krzysiek Karbowiak Date: Wed, 30 Mar 2022 15:42:23 +0200 Subject: [PATCH] Refactor assertion and adjust expected error message --- test/src/unit-regression1.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/src/unit-regression1.cpp b/test/src/unit-regression1.cpp index f39c340a0..bc29bf9fc 100644 --- a/test/src/unit-regression1.cpp +++ b/test/src/unit-regression1.cpp @@ -793,9 +793,8 @@ TEST_CASE("regression tests 1") CHECK_NOTHROW(ss >> j); CHECK(j == 222); - CHECK_THROWS_AS(ss >> j, json::parse_error&); - CHECK_THROWS_WITH(ss >> j, - "[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal"); + CHECK_THROWS_WITH_AS(ss >> j, + "[json.exception.parse_error.101] parse error at line 2, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal", json::parse_error&); } SECTION("whitespace + one value")