another test case

This commit is contained in:
Niels 2014-12-28 13:09:38 +01:00
parent 8d4f675151
commit 0720323ed7

View file

@ -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]);