mirror of
https://github.com/nlohmann/json.git
synced 2026-02-21 19:06:27 +00:00
✅ add tests for binary type
This commit is contained in:
@@ -1461,6 +1461,20 @@ TEST_CASE("constructors")
|
||||
CHECK(j == j_new);
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("binary")
|
||||
{
|
||||
{
|
||||
json j = json::binary_array({1, 2, 3});
|
||||
json j_new(j.begin(), j.end());
|
||||
CHECK((j == j_new));
|
||||
}
|
||||
{
|
||||
json j = json::binary_array({1, 2, 3});
|
||||
json j_new(j.cbegin(), j.cend());
|
||||
CHECK((j == j_new));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SECTION("construct with two invalid iterators")
|
||||
|
||||
Reference in New Issue
Block a user