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.c9
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);