aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qnull.c
diff options
context:
space:
mode:
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);
}