add more tests for binary type

This commit is contained in:
Niels Lohmann 2020-05-18 12:33:26 +02:00
parent 5dec7166ea
commit 9eb19bcc27
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 129 additions and 4 deletions

View file

@ -763,6 +763,13 @@ TEST_CASE("different basic_json types conversions")
CHECK(cj == "forty-two");
}
SECTION("binary")
{
json j = json::binary_array({1, 2, 3});
custom_json cj = j;
CHECK(cj.get_binary() == j.get_binary());
}
SECTION("object")
{
json j = {{"forty", "two"}};