aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/flat-union-branch-clash.json
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/flat-union-branch-clash.json')
-rw-r--r--tests/qapi-schema/flat-union-branch-clash.json14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/qapi-schema/flat-union-branch-clash.json b/tests/qapi-schema/flat-union-branch-clash.json
new file mode 100644
index 00000000..8fb054f0
--- /dev/null
+++ b/tests/qapi-schema/flat-union-branch-clash.json
@@ -0,0 +1,14 @@
+# we check for no duplicate keys between branches and base
+{ 'enum': 'TestEnum',
+ 'data': [ 'value1', 'value2' ] }
+{ 'struct': 'Base',
+ 'data': { 'enum1': 'TestEnum', '*name': 'str' } }
+{ 'struct': 'Branch1',
+ 'data': { 'name': 'str' } }
+{ 'struct': 'Branch2',
+ 'data': { 'value': 'int' } }
+{ 'union': 'TestUnion',
+ 'base': 'Base',
+ 'discriminator': 'enum1',
+ 'data': { 'value1': 'Branch1',
+ 'value2': 'Branch2' } }