mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
tests/qapi-schema: Cover non-string, non-dictionary members
We always report "should be a dictionary" then. This is misleading: when allow_dict, it can be a dictionary or a type name string, else it can only be a type name. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
91f9816da4
commit
10689e36eb
@ -229,12 +229,14 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
|
||||
redefined-type.json redefined-command.json redefined-builtin.json \
|
||||
redefined-event.json command-int.json bad-data.json event-max.json \
|
||||
type-bypass.json type-bypass-no-gen.json type-bypass-bad-gen.json \
|
||||
args-invalid.json \
|
||||
args-array-empty.json args-array-unknown.json args-int.json \
|
||||
args-unknown.json args-member-unknown.json args-member-array.json \
|
||||
args-member-array-bad.json args-alternate.json args-union.json \
|
||||
returns-array-bad.json returns-int.json returns-dict.json \
|
||||
returns-unknown.json returns-alternate.json returns-whitelist.json \
|
||||
missing-colon.json missing-comma-list.json missing-comma-object.json \
|
||||
struct-data-invalid.json struct-member-invalid.json \
|
||||
nested-struct-data.json non-objects.json \
|
||||
qapi-schema-test.json quoted-structural-chars.json \
|
||||
leading-comma-list.json leading-comma-object.json \
|
||||
|
1
tests/qapi-schema/args-invalid.err
Normal file
1
tests/qapi-schema/args-invalid.err
Normal file
@ -0,0 +1 @@
|
||||
tests/qapi-schema/args-invalid.json:2: 'data' for command 'foo' should be a dictionary
|
1
tests/qapi-schema/args-invalid.exit
Normal file
1
tests/qapi-schema/args-invalid.exit
Normal file
@ -0,0 +1 @@
|
||||
1
|
3
tests/qapi-schema/args-invalid.json
Normal file
3
tests/qapi-schema/args-invalid.json
Normal file
@ -0,0 +1,3 @@
|
||||
# FIXME error "should be a dictionary" is misleading, type name is also fine
|
||||
{ 'command': 'foo',
|
||||
'data': false }
|
0
tests/qapi-schema/args-invalid.out
Normal file
0
tests/qapi-schema/args-invalid.out
Normal file
1
tests/qapi-schema/struct-data-invalid.err
Normal file
1
tests/qapi-schema/struct-data-invalid.err
Normal file
@ -0,0 +1 @@
|
||||
tests/qapi-schema/struct-data-invalid.json:2: 'data' for struct 'foo' should be a dictionary
|
1
tests/qapi-schema/struct-data-invalid.exit
Normal file
1
tests/qapi-schema/struct-data-invalid.exit
Normal file
@ -0,0 +1 @@
|
||||
1
|
3
tests/qapi-schema/struct-data-invalid.json
Normal file
3
tests/qapi-schema/struct-data-invalid.json
Normal file
@ -0,0 +1,3 @@
|
||||
# FIXME error "should be a dictionary" is misleading, type name is also fine
|
||||
{ 'struct': 'foo',
|
||||
'data': false }
|
0
tests/qapi-schema/struct-data-invalid.out
Normal file
0
tests/qapi-schema/struct-data-invalid.out
Normal file
1
tests/qapi-schema/struct-member-invalid.err
Normal file
1
tests/qapi-schema/struct-member-invalid.err
Normal file
@ -0,0 +1 @@
|
||||
tests/qapi-schema/struct-member-invalid.json:2: Member 'a' of 'data' for struct 'foo' should be a dictionary
|
1
tests/qapi-schema/struct-member-invalid.exit
Normal file
1
tests/qapi-schema/struct-member-invalid.exit
Normal file
@ -0,0 +1 @@
|
||||
1
|
3
tests/qapi-schema/struct-member-invalid.json
Normal file
3
tests/qapi-schema/struct-member-invalid.json
Normal file
@ -0,0 +1,3 @@
|
||||
# FIXME error message "should be a dictionary" is wrong, must be type name
|
||||
{ 'struct': 'foo',
|
||||
'data': { 'a': false } }
|
0
tests/qapi-schema/struct-member-invalid.out
Normal file
0
tests/qapi-schema/struct-member-invalid.out
Normal file
Loading…
Reference in New Issue
Block a user