提交 86ca0dbe 编写于 作者: M Markus Armbruster

test-qobject-input-visitor: Cover missing nested struct member

Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Message-Id: <1488544368-30622-25-git-send-email-armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 9cb8ef36
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册