summaryrefslogtreecommitdiffstats
path: root/qemu/tests/qapi-schema/union-bad-branch.json
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/tests/qapi-schema/union-bad-branch.json')
-rw-r--r--qemu/tests/qapi-schema/union-bad-branch.json8
1 files changed, 8 insertions, 0 deletions
diff --git a/qemu/tests/qapi-schema/union-bad-branch.json b/qemu/tests/qapi-schema/union-bad-branch.json
new file mode 100644
index 000000000..913aa38bc
--- /dev/null
+++ b/qemu/tests/qapi-schema/union-bad-branch.json
@@ -0,0 +1,8 @@
+# we reject normal unions where branches would collide in C
+{ 'struct': 'One',
+ 'data': { 'string': 'str' } }
+{ 'struct': 'Two',
+ 'data': { 'number': 'int' } }
+{ 'union': 'MyUnion',
+ 'data': { 'one': 'One',
+ 'ONE': 'Two' } }