summaryrefslogtreecommitdiff
path: root/tests/test-qobject-input-visitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-03-03 13:32:44 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-03-05 09:14:20 +0100
commit86ca0dbe04d8eeebf460b56111c9af125e14528f (patch)
tree7fbeecca11bb846fdc77cccdf96c31e3dac3dffe /tests/test-qobject-input-visitor.c
parent9cb8ef36681b9645af1f7bd8fb64656e65de8a03 (diff)
downloadqemu-86ca0dbe04d8eeebf460b56111c9af125e14528f.tar.gz
test-qobject-input-visitor: Cover missing nested struct member
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1488544368-30622-25-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/test-qobject-input-visitor.c')
-rw-r--r--tests/test-qobject-input-visitor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c
index 10c15c46db..9f3a826353 100644
--- a/tests/test-qobject-input-visitor.c
+++ b/tests/test-qobject-input-visitor.c
@@ -894,7 +894,7 @@ static void test_visitor_in_fail_struct_missing(TestInputVisitorData *data,
char *str;
double dbl;
- v = visitor_input_test_init(data, "{}");
+ v = visitor_input_test_init(data, "{ 'sub': [ {} ] }");
visit_start_struct(v, NULL, NULL, 0, &error_abort);
visit_start_struct(v, "struct", NULL, 0, &err);
error_free_or_abort(&err);
@@ -920,6 +920,12 @@ static void test_visitor_in_fail_struct_missing(TestInputVisitorData *data,
error_free_or_abort(&err);
visit_type_null(v, "null", &err);
error_free_or_abort(&err);
+ visit_start_list(v, "sub", NULL, 0, &error_abort);
+ visit_start_struct(v, NULL, NULL, 0, &error_abort);
+ visit_type_int(v, "i64", &i64, &err);
+ error_free_or_abort(&err);
+ visit_end_struct(v, NULL);
+ visit_end_list(v, NULL);
visit_end_struct(v, NULL);
}