detect the exception in testcase - SECTION("null")
This commit is contained in:
parent
4c4af3b161
commit
e0f6c96c19
@ -1710,7 +1710,8 @@ TEST_CASE("std::optional")
|
|||||||
std::optional<std::string> opt_null;
|
std::optional<std::string> opt_null;
|
||||||
|
|
||||||
CHECK(json(opt_null) == j_null);
|
CHECK(json(opt_null) == j_null);
|
||||||
CHECK(std::optional<std::string>(j_null) == std::nullopt);
|
CHECK_THROWS_WITH(std::optional<std::string>(j_null) == std::nullopt,
|
||||||
|
"[json.exception.type_error.302] type must be string, but is null");
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("string")
|
SECTION("string")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user