aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/unknown-expr-key.json
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2015-05-04 09:05:14 -0600
committerMarkus Armbruster <armbru@redhat.com>2015-05-05 18:39:01 +0200
commit9050c65b71ac1d197330e6db221f63189e21bad5 (patch)
tree5870b694fd3b469406fc33b9a10988e44eb454cd /tests/qapi-schema/unknown-expr-key.json
parentab916faddd16f0165e9cc2551f90699be8efde53 (diff)
downloadqemu-9050c65b71ac1d197330e6db221f63189e21bad5.zip
qemu-9050c65b71ac1d197330e6db221f63189e21bad5.tar.gz
qemu-9050c65b71ac1d197330e6db221f63189e21bad5.tar.bz2
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>
Diffstat (limited to 'tests/qapi-schema/unknown-expr-key.json')
-rw-r--r--tests/qapi-schema/unknown-expr-key.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/qapi-schema/unknown-expr-key.json b/tests/qapi-schema/unknown-expr-key.json
new file mode 100644
index 0000000..1e9282d
--- /dev/null
+++ b/tests/qapi-schema/unknown-expr-key.json
@@ -0,0 +1,2 @@
+# FIXME: we should reject an expression with unknown top-level keys
+{ 'type': 'bar', 'data': { 'string': 'str'}, 'bogus': { } }