mirror of
https://github.com/nlohmann/json
synced 2024-11-23 20:40:08 +00:00
another test case
This commit is contained in:
parent
8d4f675151
commit
0720323ed7
@ -149,7 +149,12 @@ TEST_CASE("array")
|
||||
CHECK_NOTHROW(j[21] = 5);
|
||||
CHECK_THROWS_AS(j.at(21) = 5, std::out_of_range);
|
||||
CHECK_THROWS_AS(nonarray += 2, std::runtime_error);
|
||||
CHECK_THROWS_AS(nonarray.push_back(JSON(nullptr)), std::runtime_error);
|
||||
|
||||
{
|
||||
JSON nonarray2 = JSON(nullptr);
|
||||
JSON nonarray3 = JSON(nullptr);
|
||||
CHECK_THROWS_AS(nonarray2.push_back(nonarray3), std::runtime_error);
|
||||
}
|
||||
|
||||
const JSON k = j;
|
||||
CHECK_NOTHROW(k[21]);
|
||||
|
Loading…
Reference in New Issue
Block a user