diff --git a/test/src/unit-conversions.cpp b/test/src/unit-conversions.cpp index d966da4c9..476a2149d 100644 --- a/test/src/unit-conversions.cpp +++ b/test/src/unit-conversions.cpp @@ -1710,7 +1710,8 @@ TEST_CASE("std::optional") std::optional opt_null; CHECK(json(opt_null) == j_null); - CHECK(std::optional(j_null) == std::nullopt); + CHECK_THROWS_WITH(std::optional(j_null) == std::nullopt, + "[json.exception.type_error.302] type must be string, but is null"); } SECTION("string")