]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: JSON module tests for additional array parsing
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 22 Aug 2017 21:29:52 +0000 (00:29 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 22 Aug 2017 21:29:52 +0000 (00:29 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/utils/utils_module_tests.c

index 41438ff0487c32252c43c7faa668cd088950a267..1b8ff82b41731264c2382e9d5fee536afd55ba70 100644 (file)
@@ -875,6 +875,10 @@ static const struct json_test_data json_test_cases[] = {
        { "{:}", NULL },
        { "[:]", NULL },
        { "{ \"\\u005c\" : \"\\u005c\" }", "[1:OBJECT:][2:STRING:\\]" },
+       { "[{},{}]", "[1:ARRAY:][2:OBJECT:][2:OBJECT:]" },
+       { "[1,2]", "[1:ARRAY:][2:NUMBER:][2:NUMBER:]" },
+       { "[\"1\",\"2\"]", "[1:ARRAY:][2:STRING:][2:STRING:]" },
+       { "[true,false]", "[1:ARRAY:][2:BOOLEAN:][2:BOOLEAN:]" },
 };
 #endif /* CONFIG_JSON */