another test case
This commit is contained in:
parent
8d4f675151
commit
0720323ed7
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue