mirror of
https://github.com/nlohmann/json.git
synced 2026-02-20 10:26:26 +00:00
✅ improved coverage
This commit is contained in:
@@ -1253,6 +1253,13 @@ TEST_CASE("CBOR")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("invalid string in map")
|
||||
{
|
||||
CHECK_THROWS_AS(json::from_cbor(std::vector<uint8_t>({0xa1, 0xff, 0x01})), json::parse_error);
|
||||
CHECK_THROWS_WITH(json::from_cbor(std::vector<uint8_t>({0xa1, 0xff, 0x01})),
|
||||
"[json.exception.parse_error.113] parse error at 2: expected a CBOR string; last byte: 0xff");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user