mirror of
https://github.com/nlohmann/json.git
synced 2026-02-27 22:06:25 +00:00
replace constructor by from/to_json: array_t
- tweaked a bit how `get<container<json>>` is handled - added a from_json overload for forward list
This commit is contained in:
@@ -1004,6 +1004,8 @@ TEST_CASE("value conversion")
|
||||
CHECK_THROWS_AS((json().get<std::vector<json>>()), std::logic_error);
|
||||
CHECK_THROWS_AS((json().get<std::list<json>>()), std::logic_error);
|
||||
|
||||
// does type really must be an array? or it rather must not be null?
|
||||
// that's what I thought when other test like this one broke
|
||||
CHECK_THROWS_WITH((json().get<std::list<int>>()), "type must be array, but is null");
|
||||
CHECK_THROWS_WITH((json().get<std::vector<int>>()), "type must be array, but is null");
|
||||
CHECK_THROWS_WITH((json().get<std::vector<json>>()), "type must be array, but is null");
|
||||
|
||||
Reference in New Issue
Block a user