aboutsummaryrefslogtreecommitdiff
path: root/qapi-schema-test.json
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-06 18:55:56 +0100
committerKevin Wolf <kwolf@redhat.com>2012-03-12 15:14:07 +0100
commitdc8fb6df5a13f7231f88c78966f8a6c5306840b5 (patch)
tree61758a14593144f91c5ab01258f072e58020d786 /qapi-schema-test.json
parent622d241998b6a981483594712b039190ee94eff8 (diff)
downloadqemu-dc8fb6df5a13f7231f88c78966f8a6c5306840b5.zip
qemu-dc8fb6df5a13f7231f88c78966f8a6c5306840b5.tar.gz
qemu-dc8fb6df5a13f7231f88c78966f8a6c5306840b5.tar.bz2
qapi: complete implementation of unions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi-schema-test.json')
-rw-r--r--qapi-schema-test.json10
1 files changed, 10 insertions, 0 deletions
diff --git a/qapi-schema-test.json b/qapi-schema-test.json
index 2b38919..8c7f9f7 100644
--- a/qapi-schema-test.json
+++ b/qapi-schema-test.json
@@ -22,6 +22,16 @@
'dict2': { 'userdef1': 'UserDefOne', 'string2': 'str' },
'*dict3': { 'userdef2': 'UserDefOne', 'string3': 'str' } } } }
+# for testing unions
+{ 'type': 'UserDefA',
+ 'data': { 'boolean': 'bool' } }
+
+{ 'type': 'UserDefB',
+ 'data': { 'integer': 'int' } }
+
+{ 'union': 'UserDefUnion',
+ 'data': { 'a' : 'UserDefA', 'b' : 'UserDefB' } }
+
# testing commands
{ 'command': 'user_def_cmd', 'data': {} }
{ 'command': 'user_def_cmd1', 'data': {'ud1a': 'UserDefOne'} }