aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/union-bad-branch.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/union-bad-branch.json')
-rw-r--r--tests/qapi-schema/union-bad-branch.json8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/qapi-schema/union-bad-branch.json b/tests/qapi-schema/union-bad-branch.json
new file mode 100644
index 00000000..913aa38b
--- /dev/null
+++ b/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' } }