mirror of
https://github.com/nlohmann/json.git
synced 2024-12-03 21:59:08 +08:00
✅ more test cases for CBOR
This commit is contained in:
parent
3a0f5398a2
commit
81a4272444
@ -629,6 +629,21 @@ TEST_CASE("CBOR")
|
||||
CHECK(json::from_cbor(result) == j);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("half-precision float (edge cases)")
|
||||
{
|
||||
SECTION("infinity")
|
||||
{
|
||||
json j = json::from_cbor(std::vector<uint8_t>({0xf9, 0x7c, 0x00}));
|
||||
CHECK(j == nullptr);
|
||||
}
|
||||
|
||||
SECTION("NaN")
|
||||
{
|
||||
json j = json::from_cbor(std::vector<uint8_t>({0xf9, 0x7c, 0x01}));
|
||||
CHECK(j == nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("string")
|
||||
|
Loading…
Reference in New Issue
Block a user