diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-03-21 17:42:42 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2022-04-21 10:11:25 +0200 |
commit | b36dc5c279706e23ed75f0a90dfe7195340a73cb (patch) | |
tree | 59d756b86edd38fae3a5b8e86b08ffd19ac26a43 /tests/qapi-schema | |
parent | a58069494ded1282c36b7fca8d67bf487c160983 (diff) | |
download | qemu-b36dc5c279706e23ed75f0a90dfe7195340a73cb.zip qemu-b36dc5c279706e23ed75f0a90dfe7195340a73cb.tar.gz qemu-b36dc5c279706e23ed75f0a90dfe7195340a73cb.tar.bz2 |
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>
Diffstat (limited to 'tests/qapi-schema')
-rw-r--r-- | tests/qapi-schema/alternate-conflict-lists.err | 2 | ||||
-rw-r--r-- | tests/qapi-schema/alternate-conflict-lists.json | 6 | ||||
-rw-r--r-- | tests/qapi-schema/alternate-conflict-lists.out | 0 | ||||
-rw-r--r-- | tests/qapi-schema/meson.build | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/tests/qapi-schema/alternate-conflict-lists.err b/tests/qapi-schema/alternate-conflict-lists.err new file mode 100644 index 0000000..f3374ec --- /dev/null +++ b/tests/qapi-schema/alternate-conflict-lists.err @@ -0,0 +1,2 @@ +alternate-conflict-lists.json: In alternate 'Alt': +alternate-conflict-lists.json:4: branch 'two' can't be distinguished from 'one' diff --git a/tests/qapi-schema/alternate-conflict-lists.json b/tests/qapi-schema/alternate-conflict-lists.json new file mode 100644 index 0000000..a3efd6c --- /dev/null +++ b/tests/qapi-schema/alternate-conflict-lists.json @@ -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' ] } } diff --git a/tests/qapi-schema/alternate-conflict-lists.out b/tests/qapi-schema/alternate-conflict-lists.out new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/qapi-schema/alternate-conflict-lists.out diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build index caf0791..c18dd7d 100644 --- a/tests/qapi-schema/meson.build +++ b/tests/qapi-schema/meson.build @@ -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', |