mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qapi-schema: test: add a qapi-schema-test for array alternates
Check that conflicts among array alternates are detected correctly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220321164243.200569-3-pbonzini@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Expected test output alternate-conflict-lists.json corrected] Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
a58069494d
commit
b36dc5c279
4 changed files with 9 additions and 0 deletions
2
tests/qapi-schema/alternate-conflict-lists.err
Normal file
2
tests/qapi-schema/alternate-conflict-lists.err
Normal file
|
@ -0,0 +1,2 @@
|
|||
alternate-conflict-lists.json: In alternate 'Alt':
|
||||
alternate-conflict-lists.json:4: branch 'two' can't be distinguished from 'one'
|
6
tests/qapi-schema/alternate-conflict-lists.json
Normal file
6
tests/qapi-schema/alternate-conflict-lists.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Two lists conflict even if their inner types would be compatible
|
||||
{ 'struct': 'One',
|
||||
'data': { 'name': 'str' } }
|
||||
{ 'alternate': 'Alt',
|
||||
'data': { 'one': [ 'int' ],
|
||||
'two': [ 'str' ] } }
|
0
tests/qapi-schema/alternate-conflict-lists.out
Normal file
0
tests/qapi-schema/alternate-conflict-lists.out
Normal file
|
@ -11,6 +11,7 @@ schemas = [
|
|||
'alternate-conflict-dict.json',
|
||||
'alternate-conflict-enum-bool.json',
|
||||
'alternate-conflict-enum-int.json',
|
||||
'alternate-conflict-lists.json',
|
||||
'alternate-conflict-string.json',
|
||||
'alternate-conflict-bool-string.json',
|
||||
'alternate-conflict-num-string.json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue