Add simple test for cbor byte
This commit is contained in:
parent
e54f03f73b
commit
dd08f7705f
1 changed files with 2 additions and 0 deletions
|
@ -2503,6 +2503,8 @@ TEST_CASE("examples from RFC 7049 Appendix A")
|
||||||
std::vector<uint8_t> expected((std::istreambuf_iterator<char>(f_bin)),
|
std::vector<uint8_t> expected((std::istreambuf_iterator<char>(f_bin)),
|
||||||
std::istreambuf_iterator<char>());
|
std::istreambuf_iterator<char>());
|
||||||
CHECK(j == json::binary(expected));
|
CHECK(j == json::binary(expected));
|
||||||
|
|
||||||
|
CHECK(json::to_cbor(json::binary(std::vector<uint8_t> {}, 0x42)) == std::vector<uint8_t> {0xd8, 0x42, 0x40});
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTION("arrays")
|
SECTION("arrays")
|
||||||
|
|
Loading…
Reference in a new issue