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