diff options
| author | Markus Armbruster | 2014-03-01 08:40:33 +0100 |
|---|---|---|
| committer | Luiz Capitulino | 2014-03-03 17:16:45 +0100 |
| commit | 2fc00432830e42e3c24850a379194a61f09e3663 (patch) | |
| tree | 05753100f6da40a39f11d52e3840b95b9530a6bf /tests/qapi-schema/qapi-schema-test.json | |
| parent | tests/qapi-schema: Cover union types with base (diff) | |
| download | qemu-2fc00432830e42e3c24850a379194a61f09e3663.tar.gz qemu-2fc00432830e42e3c24850a379194a61f09e3663.tar.xz qemu-2fc00432830e42e3c24850a379194a61f09e3663.zip | |
tests/qapi-schema: Cover flat union types
The test demonstrates a generator bug: the generated struct
UserDefFlatUnion doesn't include members for the indirect base
UserDefZero.
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/qapi-schema/qapi-schema-test.json')
| -rw-r--r-- | tests/qapi-schema/qapi-schema-test.json | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json index f5c5d37104..471ba47dde 100644 --- a/tests/qapi-schema/qapi-schema-test.json +++ b/tests/qapi-schema/qapi-schema-test.json @@ -37,6 +37,13 @@ 'base': 'UserDefZero', 'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } } +{ 'union': 'UserDefFlatUnion', + 'base': 'UserDefOne', + 'discriminator': 'string', + 'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } } +# FIXME generated struct UserDefFlatUnion has members for direct base +# UserDefOne, but lacks members for indirect base UserDefZero + { 'union': 'UserDefAnonUnion', 'discriminator': {}, 'data': { 'uda': 'UserDefA', 's': 'str', 'i': 'int' } } |
