qapi: Add some expr tests
authorEric Blake <eblake@redhat.com>
Mon, 4 May 2015 15:05:14 +0000 (09:05 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 May 2015 16:39:01 +0000 (18:39 +0200)
commit9050c65b71ac1d197330e6db221f63189e21bad5
tree5870b694fd3b469406fc33b9a10988e44eb454cd
parentab916faddd16f0165e9cc2551f90699be8efde53
qapi: Add some expr tests

Demonstrate that the qapi generator doesn't deal well with
expressions that aren't up to par. Later patches will improve
the expected results as the generator is made stricter.  Only
a few of the the added tests actually behave sanely at
rejecting obvious problems or demonstrating success.

Note that in some cases, we reject bad QAPI merely because our
pseudo-JSON parser does not yet know how to parse numbers.  This
series does not address that, but when a later series adds support
for numeric defaults of integer fields, the testsuite will ensure
that we don't lose the error (and hopefully that the error
message quality is improved).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
45 files changed:
tests/Makefile
tests/qapi-schema/bad-base.err [new file with mode: 0644]
tests/qapi-schema/bad-base.exit [new file with mode: 0644]
tests/qapi-schema/bad-base.json [new file with mode: 0644]
tests/qapi-schema/bad-base.out [new file with mode: 0644]
tests/qapi-schema/bad-ident.err [new file with mode: 0644]
tests/qapi-schema/bad-ident.exit [new file with mode: 0644]
tests/qapi-schema/bad-ident.json [new file with mode: 0644]
tests/qapi-schema/bad-ident.out [new file with mode: 0644]
tests/qapi-schema/bad-type-bool.err [new file with mode: 0644]
tests/qapi-schema/bad-type-bool.exit [new file with mode: 0644]
tests/qapi-schema/bad-type-bool.json [new file with mode: 0644]
tests/qapi-schema/bad-type-bool.out [new file with mode: 0644]
tests/qapi-schema/bad-type-dict.err [new file with mode: 0644]
tests/qapi-schema/bad-type-dict.exit [new file with mode: 0644]
tests/qapi-schema/bad-type-dict.json [new file with mode: 0644]
tests/qapi-schema/bad-type-dict.out [new file with mode: 0644]
tests/qapi-schema/bad-type-int.err [new file with mode: 0644]
tests/qapi-schema/bad-type-int.exit [new file with mode: 0644]
tests/qapi-schema/bad-type-int.json [new file with mode: 0644]
tests/qapi-schema/bad-type-int.out [new file with mode: 0644]
tests/qapi-schema/double-data.err [new file with mode: 0644]
tests/qapi-schema/double-data.exit [new file with mode: 0644]
tests/qapi-schema/double-data.json [new file with mode: 0644]
tests/qapi-schema/double-data.out [new file with mode: 0644]
tests/qapi-schema/double-type.err [new file with mode: 0644]
tests/qapi-schema/double-type.exit [new file with mode: 0644]
tests/qapi-schema/double-type.json [new file with mode: 0644]
tests/qapi-schema/double-type.out [new file with mode: 0644]
tests/qapi-schema/event-case.err [new file with mode: 0644]
tests/qapi-schema/event-case.exit [new file with mode: 0644]
tests/qapi-schema/event-case.json [new file with mode: 0644]
tests/qapi-schema/event-case.out [new file with mode: 0644]
tests/qapi-schema/ident-with-escape.err [new file with mode: 0644]
tests/qapi-schema/ident-with-escape.exit [new file with mode: 0644]
tests/qapi-schema/ident-with-escape.json [new file with mode: 0644]
tests/qapi-schema/ident-with-escape.out [new file with mode: 0644]
tests/qapi-schema/missing-type.err [new file with mode: 0644]
tests/qapi-schema/missing-type.exit [new file with mode: 0644]
tests/qapi-schema/missing-type.json [new file with mode: 0644]
tests/qapi-schema/missing-type.out [new file with mode: 0644]
tests/qapi-schema/unknown-expr-key.err [new file with mode: 0644]
tests/qapi-schema/unknown-expr-key.exit [new file with mode: 0644]
tests/qapi-schema/unknown-expr-key.json [new file with mode: 0644]
tests/qapi-schema/unknown-expr-key.out [new file with mode: 0644]