Added wildcard key (*) for filters (closes #1309)

This commit is contained in:
Benoit Blanchon
2020-09-28 21:11:38 +02:00
parent 726f8be341
commit 8385d5fa3a
3 changed files with 11 additions and 1 deletions

View File

@ -214,6 +214,15 @@ TEST_CASE("Filtering") {
"{\"example\":{\"outcome\":42}}",
2 * JSON_OBJECT_SIZE(1) + 16
},
{
// wildcard
"{\"example\":{\"type\":\"int\",\"outcome\":42}}",
"{\"*\":{\"outcome\":true}}",
10,
DeserializationError::Ok,
"{\"example\":{\"outcome\":42}}",
2 * JSON_OBJECT_SIZE(1) + 16
},
{
// only the first element of array counts
"[1,2,3]",