add built-in array support in get_to
This commit is contained in:
parent
2806b201a8
commit
e6e6805c6c
4 changed files with 56 additions and 0 deletions
|
@ -386,6 +386,16 @@ TEST_CASE("value conversion")
|
|||
CHECK(json(a) == j);
|
||||
}
|
||||
|
||||
SECTION("built-in arrays")
|
||||
{
|
||||
const int nbs[] = {0, 1, 2};
|
||||
int nbs2[] = {0, 0, 0};
|
||||
|
||||
json j2 = nbs;
|
||||
j2.get_to(nbs2);
|
||||
CHECK(std::equal(std::begin(nbs), std::end(nbs), std::begin(nbs2)));
|
||||
}
|
||||
|
||||
SECTION("std::deque<json>")
|
||||
{
|
||||
std::deque<json> a{"previous", "value"};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue