aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/flat-union-base-union.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/flat-union-base-union.json')
-rw-r--r--tests/qapi-schema/flat-union-base-union.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/qapi-schema/flat-union-base-union.json b/tests/qapi-schema/flat-union-base-union.json
new file mode 100644
index 0000000000..838986c48a
--- /dev/null
+++ b/tests/qapi-schema/flat-union-base-union.json
@@ -0,0 +1,15 @@
+# FIXME: the error message needs help: we require the base to be a struct
+{ 'enum': 'TestEnum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'type': 'TestTypeA',
+ 'data': { 'string': 'str' } }
+{ 'type': 'TestTypeB',
+ 'data': { 'integer': 'int' } }
+{ 'union': 'UnionBase',
+ 'data': { 'kind1': 'TestTypeA',
+ 'kind2': 'TestTypeB' } }
+{ 'union': 'TestUnion',
+ 'base': 'UnionBase',
+ 'discriminator': 'type',
+ 'data': { 'kind1': 'TestTypeA',
+ 'kind2': 'TestTypeB' } }