tests/qapi-schema: Switch member name clash test to struct

Test args-name-clash covers command parameter name clash.  This
effectively covers struct member name clash as well.  The next commit
will make parameter name clash impossible.  Convert args-name-clash
from testing command to testing a struct, and rename it to
struct-member-name-clash.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210323094025.3569441-26-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message typo fixed]
This commit is contained in:
Markus Armbruster 2021-03-23 10:40:22 +01:00
parent 05ebf841ef
commit e75d4225b7
5 changed files with 4 additions and 4 deletions

View File

@ -1,2 +0,0 @@
args-name-clash.json: In command 'oops':
args-name-clash.json:4: parameter 'a_b' collides with parameter 'a-b'

View File

@ -30,7 +30,6 @@ schemas = [
'args-member-array-bad.json',
'args-member-case.json',
'args-member-unknown.json',
'args-name-clash.json',
'args-union.json',
'args-unknown.json',
'bad-base.json',
@ -177,6 +176,7 @@ schemas = [
'struct-member-if-invalid.json',
'struct-member-invalid-dict.json',
'struct-member-invalid.json',
'struct-member-name-clash.json',
'trailing-comma-list.json',
'trailing-comma-object.json',
'type-bypass-bad-gen.json',

View File

@ -0,0 +1,2 @@
struct-member-name-clash.json: In struct 'Oops':
struct-member-name-clash.json:4: member 'a_b' collides with member 'a-b'

View File

@ -1,4 +1,4 @@
# C member name collision
# Reject members that clash when mapped to C names (we would have two 'a_b'
# members).
{ 'command': 'oops', 'data': { 'a-b': 'str', 'a_b': 'str' } }
{ 'struct': 'Oops', 'data': { 'a-b': 'str', 'a_b': 'str' } }