✅ more test cases for CBOR
This commit is contained in:
parent
3a0f5398a2
commit
81a4272444
1 changed files with 15 additions and 0 deletions
|
@ -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 a new issue