diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-06-26 18:22:59 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-07-24 13:35:11 +0200 |
commit | d2f95f4d482374485234790a6fc3cca29ebb7355 (patch) | |
tree | 4c95230bc64d9a294c9bc6de6696e887576a235a /tests/check-qnull.c | |
parent | 006ca09f3027d86346fce707e9295975c6558f42 (diff) |
qapi: Use QNull for a more regular visit_type_null()
Make visit_type_null() take an @obj argument like its buddies. This
helps keep the next commit simple.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tests/check-qnull.c')
-rw-r--r-- | tests/check-qnull.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/check-qnull.c b/tests/check-qnull.c index 1ab7c983a5..5c6eb0adc8 100644 --- a/tests/check-qnull.c +++ b/tests/check-qnull.c @@ -38,6 +38,7 @@ static void qnull_visit_test(void) { QObject *obj; Visitor *v; + QNull *null; /* * Most tests of interactions between QObject and visitors are in @@ -49,13 +50,17 @@ static void qnull_visit_test(void) obj = QOBJECT(qnull()); v = qobject_input_visitor_new(obj); qobject_decref(obj); - visit_type_null(v, NULL, &error_abort); + visit_type_null(v, NULL, &null, &error_abort); + g_assert(obj == QOBJECT(&qnull_)); + QDECREF(null); visit_free(v); + null = NULL; v = qobject_output_visitor_new(&obj); - visit_type_null(v, NULL, &error_abort); + visit_type_null(v, NULL, &null, &error_abort); visit_complete(v, &obj); g_assert(obj == QOBJECT(&qnull_)); + QDECREF(null); qobject_decref(obj); visit_free(v); |