From dd08f7705f621894a657aaef45ec73062c71398e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 6 Jul 2020 18:06:10 -0400 Subject: [PATCH] Add simple test for cbor byte --- test/src/unit-cbor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/src/unit-cbor.cpp b/test/src/unit-cbor.cpp index b1c1a43e..49dc7201 100644 --- a/test/src/unit-cbor.cpp +++ b/test/src/unit-cbor.cpp @@ -2503,6 +2503,8 @@ TEST_CASE("examples from RFC 7049 Appendix A") std::vector expected((std::istreambuf_iterator(f_bin)), std::istreambuf_iterator()); CHECK(j == json::binary(expected)); + + CHECK(json::to_cbor(json::binary(std::vector {}, 0x42)) == std::vector {0xd8, 0x42, 0x40}); } SECTION("arrays")