mirror of
https://github.com/nlohmann/json
synced 2024-12-26 18:41:03 +00:00
another test case
This commit is contained in:
parent
ee45bca4a9
commit
7afabc2b7e
@ -171,6 +171,7 @@ TEST_CASE("array")
|
|||||||
json nonarray3 = json(2);
|
json nonarray3 = json(2);
|
||||||
json empty3 = json();
|
json empty3 = json();
|
||||||
CHECK_THROWS_AS(nonarray2.push_back(nonarray3), std::runtime_error);
|
CHECK_THROWS_AS(nonarray2.push_back(nonarray3), std::runtime_error);
|
||||||
|
CHECK_THROWS_AS(nonarray2.push_back(3), std::runtime_error);
|
||||||
CHECK_NOTHROW(empty3.push_back(nonarray3));
|
CHECK_NOTHROW(empty3.push_back(nonarray3));
|
||||||
CHECK(empty3.type() == json::value_type::array);
|
CHECK(empty3.type() == json::value_type::array);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user