aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-no-base.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/union-no-base.json')
-rw-r--r--tests/qapi-schema/union-no-base.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qapi-schema/union-no-base.json b/tests/qapi-schema/union-no-base.json
new file mode 100644
index 0000000000..f6fe12da3b
--- /dev/null
+++ b/tests/qapi-schema/union-no-base.json
@@ -0,0 +1,11 @@
+# unions require a base
+{ 'struct': 'TestTypeA',
+ 'data': { 'string': 'str' } }
+{ 'struct': 'TestTypeB',
+ 'data': { 'integer': 'int' } }
+{ 'enum': 'Enum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'union': 'TestUnion',
+ 'discriminator': 'Enum',
+ 'data': { 'value1': 'TestTypeA',
+ 'value2': 'TestTypeB' } }