added missing tests

This commit is contained in:
Niels Lohmann 2017-02-26 11:50:52 +01:00
parent f1cd15ce7e
commit d1b30250d6
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 17 additions and 1 deletions

View file

@ -182,6 +182,10 @@ TEST_CASE("value conversion")
std::vector<float> v;
CHECK_THROWS_AS(nlohmann::from_json(j, v), std::logic_error);
CHECK(v.capacity() == j.size());
// make sure all values are properly copied
std::vector<int> v2 = json({1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
CHECK(v2.size() == 10);
}
#endif
}