Skip to content

Commit

Permalink
Add simple test for cbor byte
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbauer committed Jul 6, 2020
1 parent e54f03f commit dd08f77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/src/unit-cbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,8 @@ TEST_CASE("examples from RFC 7049 Appendix A")
std::vector<uint8_t> expected((std::istreambuf_iterator<char>(f_bin)),
std::istreambuf_iterator<char>());
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")
Expand Down

0 comments on commit dd08f77

Please sign in to comment.