add tests for binary type

This commit is contained in:
Niels Lohmann
2020-05-09 13:46:24 +02:00
parent f0c6ab4d3b
commit 3fa94f0755
3 changed files with 39 additions and 0 deletions

View File

@@ -115,6 +115,14 @@ TEST_CASE("constructors")
CHECK(j.type() == t);
CHECK(j == 0.0);
}
SECTION("binary")
{
auto t = json::value_t::binary;
json j(t);
CHECK(j.type() == t);
CHECK(j == json::binary_array({}));
}
}
SECTION("create a null object (implicitly)")