]> git.proxmox.com Git - mirror_qemu.git/commit
qapi: More tests of input arrays
authorEric Blake <eblake@redhat.com>
Fri, 6 Nov 2015 06:35:34 +0000 (23:35 -0700)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 10 Nov 2015 07:09:14 +0000 (08:09 +0100)
commit2533377c7b0c686d1510ed6499cedf938607e805
tree3949fc61de4141371ae4ca00c975b561784c4165
parentdd5ee2c2d3e3a17647ddd9bfa97935b8cb5dfa40
qapi: More tests of input arrays

Our testsuite had no coverage of empty arrays, nor of what
happens when the input does not match the expected type.
Useful to have, especially if we start changing the visitor
contracts.

I did not think it worth duplicating these additions to
test-qmp-input-strict; since all strict mode does is add
the ability to reject JSON input that has more keys than
what the visitor expects, yet the additions in this patch
error out earlier than that point regardless of whether
strict mode was requested.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1446791754-23823-11-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
tests/test-qmp-input-visitor.c