diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-03-01 08:40:32 +0100 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-03-03 11:16:45 -0500 |
commit | 7ad993b480d3f4f1261d3374516effd9bff20bc6 (patch) | |
tree | f5b590a9c7b3be30c12769ba4216b8bf6fba086f /tests/test-qmp-input-visitor.c | |
parent | aabbd472a08249335d6a004173b30d552cb70d1d (diff) |
tests/qapi-schema: Cover union types with base
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tests/test-qmp-input-visitor.c')
-rw-r--r-- | tests/test-qmp-input-visitor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index 9c7bf38521..a0607cf271 100644 --- a/tests/test-qmp-input-visitor.c +++ b/tests/test-qmp-input-visitor.c @@ -293,11 +293,12 @@ static void test_visitor_in_union(TestInputVisitorData *data, Error *err = NULL; UserDefUnion *tmp; - v = visitor_input_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }"); + v = visitor_input_test_init(data, "{ 'type': 'b', 'integer': 41, 'data' : { 'integer': 42 } }"); visit_type_UserDefUnion(v, &tmp, NULL, &err); g_assert(err == NULL); g_assert_cmpint(tmp->kind, ==, USER_DEF_UNION_KIND_B); + g_assert_cmpint(tmp->integer, ==, 41); g_assert_cmpint(tmp->b->integer, ==, 42); qapi_free_UserDefUnion(tmp); } |