aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/union-clash-member.json
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-09-17 16:31:33 +0200
committerMarkus Armbruster <armbru@redhat.com>2021-09-27 08:23:25 +0200
commit8b3b3a16dfca57b7c4e7b8af215aec96880153d7 (patch)
treea4d6838ead2f7a8ef8e45240e310987c373be1cc /tests/qapi-schema/union-clash-member.json
parent4e99f4b12c0e47898e8358a5c8fa54267bb16185 (diff)
tests/qapi-schema: Rename flat-union-* test cases to union-*
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210917143134.412106-23-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com
Diffstat (limited to 'tests/qapi-schema/union-clash-member.json')
-rw-r--r--tests/qapi-schema/union-clash-member.json15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/qapi-schema/union-clash-member.json b/tests/qapi-schema/union-clash-member.json
new file mode 100644
index 0000000000..9efc7719b8
--- /dev/null
+++ b/tests/qapi-schema/union-clash-member.json
@@ -0,0 +1,15 @@
+# We check for no duplicate keys between branch members and base
+# base's member 'name' clashes with Branch1's
+{ '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' } }