summaryrefslogtreecommitdiffstats
path: root/qemu/tests/qapi-schema/flat-union-inline.json
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/tests/qapi-schema/flat-union-inline.json')
-rw-r--r--qemu/tests/qapi-schema/flat-union-inline.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/qemu/tests/qapi-schema/flat-union-inline.json b/qemu/tests/qapi-schema/flat-union-inline.json
new file mode 100644
index 000000000..6bfdd6581
--- /dev/null
+++ b/qemu/tests/qapi-schema/flat-union-inline.json
@@ -0,0 +1,11 @@
+# we require branches to be a struct name
+# TODO: should we allow anonymous inline types?
+{ 'enum': 'TestEnum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'struct': 'Base',
+ 'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
+{ 'union': 'TestUnion',
+ 'base': { 'enum1': 'TestEnum', 'kind': 'str' },
+ 'discriminator': 'enum1',
+ 'data': { 'value1': { 'string': 'str' },
+ 'value2': { 'integer': 'int' } } }