summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/qapi-schema-test.json
diff options
context:
space:
mode:
authorEric Blake2015-05-14 14:50:59 +0200
committerMarkus Armbruster2015-05-14 18:21:21 +0200
commit857af5f06c3fb097d1bb6bc8a23b9992aac99e75 (patch)
tree7007532f36bdb0ab5194e4fbe2f47764b0f74b17 /tests/qapi-schema/qapi-schema-test.json
parentqapi: Support downstream simple unions (diff)
downloadqemu-857af5f06c3fb097d1bb6bc8a23b9992aac99e75.tar.gz
qemu-857af5f06c3fb097d1bb6bc8a23b9992aac99e75.tar.xz
qemu-857af5f06c3fb097d1bb6bc8a23b9992aac99e75.zip
qapi: Support downstream flat unions
Enhance the testsuite to cover downstream flat unions, including the base type, discriminator name and type, and branch name and type. Update the generator to mangle the union names in the appropriate places. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/qapi-schema-test.json')
-rw-r--r--tests/qapi-schema/qapi-schema-test.json5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qapi-schema/qapi-schema-test.json b/tests/qapi-schema/qapi-schema-test.json
index 6416d85757..ac236e343e 100644
--- a/tests/qapi-schema/qapi-schema-test.json
+++ b/tests/qapi-schema/qapi-schema-test.json
@@ -115,3 +115,8 @@
{ 'struct': '__org.qemu_x-Struct', 'base': '__org.qemu_x-Base',
'data': { '__org.qemu_x-member2': 'str' } }
{ 'union': '__org.qemu_x-Union1', 'data': { '__org.qemu_x-branch': 'str' } }
+{ 'struct': '__org.qemu_x-Struct2',
+ 'data': { 'array': ['__org.qemu_x-Union1'] } }
+{ 'union': '__org.qemu_x-Union2', 'base': '__org.qemu_x-Base',
+ 'discriminator': '__org.qemu_x-member1',
+ 'data': { '__org.qemu_x-value': '__org.qemu_x-Struct2' } }