aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qnull.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-07-06 11:38:09 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-07-06 11:38:09 +0100
commit975b1c3ac6ae57b3e1356b0156c68f63a8a349dc (patch)
treeecd35419f10196800c44176645084c3691f660df /tests/check-qnull.c
parentfc5d0a2b243ad7bd4db1f29e6e274507df54a8a8 (diff)
parentb6954712abea03afd686b724060f9873e2c61f2b (diff)
downloadqemu-975b1c3ac6ae57b3e1356b0156c68f63a8a349dc.zip
qemu-975b1c3ac6ae57b3e1356b0156c68f63a8a349dc.tar.gz
qemu-975b1c3ac6ae57b3e1356b0156c68f63a8a349dc.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-07-06' into staging
QAPI patches for 2016-07-06 # gpg: Signature made Wed 06 Jul 2016 10:00:51 BST # gpg: using RSA key 0x3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2016-07-06: replay: Use new QAPI cloning sockets: Use new QAPI cloning qapi: Add new clone visitor qapi: Add new visit_complete() function tests: Factor out common code in qapi output tests tests: Clean up test-string-output-visitor qmp-output-visitor: Favor new visit_free() function string-output-visitor: Favor new visit_free() function qmp-input-visitor: Favor new visit_free() function string-input-visitor: Favor new visit_free() function opts-visitor: Favor new visit_free() function qapi: Add new visit_free() function qapi: Add parameter to visit_end_* qemu-img: Don't leak errors when outputting JSON qapi: Improve use of qmp/types.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/check-qnull.c')
-rw-r--r--tests/check-qnull.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/check-qnull.c b/tests/check-qnull.c
index 05d562d..dc906b1 100644
--- a/tests/check-qnull.c
+++ b/tests/check-qnull.c
@@ -37,8 +37,7 @@ static void qnull_ref_test(void)
static void qnull_visit_test(void)
{
QObject *obj;
- QmpOutputVisitor *qov;
- QmpInputVisitor *qiv;
+ Visitor *v;
/*
* Most tests of interactions between QObject and visitors are in
@@ -48,17 +47,17 @@ static void qnull_visit_test(void)
g_assert(qnull_.refcnt == 1);
obj = qnull();
- qiv = qmp_input_visitor_new(obj, true);
+ v = qmp_input_visitor_new(obj, true);
qobject_decref(obj);
- visit_type_null(qmp_input_get_visitor(qiv), NULL, &error_abort);
- qmp_input_visitor_cleanup(qiv);
+ visit_type_null(v, NULL, &error_abort);
+ visit_free(v);
- qov = qmp_output_visitor_new();
- visit_type_null(qmp_output_get_visitor(qov), NULL, &error_abort);
- obj = qmp_output_get_qobject(qov);
+ v = qmp_output_visitor_new(&obj);
+ visit_type_null(v, NULL, &error_abort);
+ visit_complete(v, &obj);
g_assert(obj == &qnull_);
qobject_decref(obj);
- qmp_output_visitor_cleanup(qov);
+ visit_free(v);
g_assert(qnull_.refcnt == 1);
}