mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
aabbd472a0
commit
7ad993b480
5 changed files with 8 additions and 4 deletions
|
@ -132,7 +132,7 @@ static void test_validate_union(TestInputVisitorData *data,
|
|||
Visitor *v;
|
||||
Error *errp = NULL;
|
||||
|
||||
v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }");
|
||||
v = validate_test_init(data, "{ 'type': 'b', 'integer': 41, 'data' : { 'integer': 42 } }");
|
||||
|
||||
visit_type_UserDefUnion(v, &tmp, NULL, &errp);
|
||||
g_assert(!errp);
|
||||
|
@ -205,7 +205,7 @@ static void test_validate_fail_union(TestInputVisitorData *data,
|
|||
Error *errp = NULL;
|
||||
Visitor *v;
|
||||
|
||||
v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 }, 'extra': 'yyy' }");
|
||||
v = validate_test_init(data, "{ 'type': 'b', 'data' : { 'integer': 42 } }");
|
||||
|
||||
visit_type_UserDefUnion(v, &tmp, NULL, &errp);
|
||||
g_assert(errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue