aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-empty.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/union-empty.json')
-rw-r--r--tests/qapi-schema/union-empty.json4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qapi-schema/union-empty.json b/tests/qapi-schema/union-empty.json
new file mode 100644
index 0000000000..584ed6098c
--- /dev/null
+++ b/tests/qapi-schema/union-empty.json
@@ -0,0 +1,4 @@
+# union discriminator enum cannot be empty
+{ 'enum': 'Empty', 'data': [ ] }
+{ 'struct': 'Base', 'data': { 'type': 'Empty' } }
+{ 'union': 'Union', 'base': 'Base', 'discriminator': 'type', 'data': { } }