qemu-patch-raspberry4/tests/qapi-schema
Wenchao Xia b86b05ed60 qapi script: check correctness of union
Since line info is remembered as QAPISchema.line now, this patch
uses it as additional info for every expr in QAPISchema inside qapi.py,
then improves error message with it in checking of exprs.

For common union the patch will check whether base is a valid complex
type if specified. For flat union it will check whether base presents,
whether discriminator is found in base, whether the key of every branch
is correct when discriminator is an enum type.

Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-03-11 09:07:41 -04:00
..
comments.err qapi.py: Permit comments starting anywhere on the line 2013-07-29 10:37:11 -05:00
comments.exit qapi.py: Permit comments starting anywhere on the line 2013-07-29 10:37:11 -05:00
comments.json
comments.out qapi script: remember explicitly defined enum values 2014-03-11 09:07:41 -04:00
duplicate-key.err qapi script: add check for duplicated key 2014-03-11 09:07:41 -04:00
duplicate-key.exit qapi script: add check for duplicated key 2014-03-11 09:07:41 -04:00
duplicate-key.json qapi script: add check for duplicated key 2014-03-11 09:07:41 -04:00
duplicate-key.out qapi script: add check for duplicated key 2014-03-11 09:07:41 -04:00
empty.err
empty.exit
empty.json
empty.out
flat-union-invalid-branch-key.err qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-branch-key.exit qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-branch-key.json qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-branch-key.out qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-discriminator.err qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-discriminator.exit qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-discriminator.json qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-invalid-discriminator.out qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-no-base.err qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-no-base.exit qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-no-base.json qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
flat-union-no-base.out qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
funny-char.err qapi.py: Reject invalid characters in schema file 2013-07-29 10:37:11 -05:00
funny-char.exit qapi.py: Reject invalid characters in schema file 2013-07-29 10:37:11 -05:00
funny-char.json
funny-char.out qapi.py: Reject invalid characters in schema file 2013-07-29 10:37:11 -05:00
indented-expr.err
indented-expr.exit
indented-expr.json
indented-expr.out qapi.py: Restructure lexer and parser 2013-07-29 10:37:10 -05:00
missing-colon.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-colon.exit qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-colon.json
missing-colon.out qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-list.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-list.exit qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-list.json
missing-comma-list.out qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-object.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-object.exit qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
missing-comma-object.json
missing-comma-object.out qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
non-objects.err qapi.py: Fix diagnosing non-objects at a schema's top-level 2013-07-29 10:37:11 -05:00
non-objects.exit
non-objects.json
non-objects.out
qapi-schema-test.err
qapi-schema-test.exit
qapi-schema-test.json tests/qapi-schema: Cover flat union types 2014-03-03 11:16:45 -05:00
qapi-schema-test.out qapi script: remember explicitly defined enum values 2014-03-11 09:07:41 -04:00
quoted-structural-chars.err qapi.py: Fix diagnosing non-objects at a schema's top-level 2013-07-29 10:37:11 -05:00
quoted-structural-chars.exit qapi.py: Restructure lexer and parser 2013-07-29 10:37:10 -05:00
quoted-structural-chars.json
quoted-structural-chars.out qapi.py: Restructure lexer and parser 2013-07-29 10:37:10 -05:00
test-qapi.py qapi.py: Decent syntax error reporting 2013-07-29 10:37:10 -05:00
trailing-comma-list.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
trailing-comma-list.exit qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
trailing-comma-list.json
trailing-comma-list.out qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
trailing-comma-object.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
trailing-comma-object.exit qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
trailing-comma-object.json
trailing-comma-object.out qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
unclosed-list.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
unclosed-list.exit
unclosed-list.json
unclosed-list.out
unclosed-object.err qapi.py: Fix schema parser to check syntax systematically 2013-07-29 10:37:11 -05:00
unclosed-object.exit
unclosed-object.json
unclosed-object.out
unclosed-string.err qapi.py: Decent syntax error reporting 2013-07-29 10:37:10 -05:00
unclosed-string.exit
unclosed-string.json
unclosed-string.out
union-invalid-base.err qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
union-invalid-base.exit qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
union-invalid-base.json qapi script: check correctness of union 2014-03-11 09:07:41 -04:00
union-invalid-base.out qapi script: check correctness of union 2014-03-11 09:07:41 -04:00