summaryrefslogtreecommitdiffstats
path: root/qemu/tests/qapi-schema/union-invalid-base.json
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/tests/qapi-schema/union-invalid-base.json')
-rw-r--r--qemu/tests/qapi-schema/union-invalid-base.json12
1 files changed, 12 insertions, 0 deletions
diff --git a/qemu/tests/qapi-schema/union-invalid-base.json b/qemu/tests/qapi-schema/union-invalid-base.json
new file mode 100644
index 000000000..92be39df6
--- /dev/null
+++ b/qemu/tests/qapi-schema/union-invalid-base.json
@@ -0,0 +1,12 @@
+# a union base type must be a struct
+{ 'struct': 'TestTypeA',
+ 'data': { 'string': 'str' } }
+
+{ 'struct': 'TestTypeB',
+ 'data': { 'integer': 'int' } }
+
+{ 'union': 'TestUnion',
+ 'base': 'int',
+ 'discriminator': 'int',
+ 'data': { 'value1': 'TestTypeA',
+ 'value2': 'TestTypeB' } }