aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/qapi-schema-test.json
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-03-01 08:40:33 +0100
committerLuiz Capitulino <lcapitulino@redhat.com>2014-03-03 11:16:45 -0500
commit2fc00432830e42e3c24850a379194a61f09e3663 (patch)
tree05753100f6da40a39f11d52e3840b95b9530a6bf /tests/qapi-schema/qapi-schema-test.json
parent7ad993b480d3f4f1261d3374516effd9bff20bc6 (diff)
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.json7
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' } }