summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/check-qjson.c6
-rw-r--r--tests/check-qnull.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 53f2275b9b..a3a97b0d99 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -1012,7 +1012,7 @@ static void keyword_literal(void)
 {
     QObject *obj;
     QBool *qbool;
-    QObject *null;
+    QNull *null;
     QString *str;
 
     obj = qobject_from_json("true", &error_abort);
@@ -1053,10 +1053,10 @@ static void keyword_literal(void)
     g_assert(qobject_type(obj) == QTYPE_QNULL);
 
     null = qnull();
-    g_assert(null == obj);
+    g_assert(QOBJECT(null) == obj);
 
     qobject_decref(obj);
-    qobject_decref(null);
+    QDECREF(null);
 }
 
 typedef struct LiteralQDictEntry LiteralQDictEntry;
diff --git a/tests/check-qnull.c b/tests/check-qnull.c
index 8dd1c9686f..1ab7c983a5 100644
--- a/tests/check-qnull.c
+++ b/tests/check-qnull.c
@@ -24,14 +24,14 @@ static void qnull_ref_test(void)
 {
     QObject *obj;
 
-    g_assert(qnull_.refcnt == 1);
-    obj = qnull();
+    g_assert(qnull_.base.refcnt == 1);
+    obj = QOBJECT(qnull());
     g_assert(obj);
-    g_assert(obj == &qnull_);
-    g_assert(qnull_.refcnt == 2);
+    g_assert(obj == QOBJECT(&qnull_));
+    g_assert(qnull_.base.refcnt == 2);
     g_assert(qobject_type(obj) == QTYPE_QNULL);
     qobject_decref(obj);
-    g_assert(qnull_.refcnt == 1);
+    g_assert(qnull_.base.refcnt == 1);
 }
 
 static void qnull_visit_test(void)
@@ -45,8 +45,8 @@ static void qnull_visit_test(void)
      * depend on layering violations to check qnull_ refcnt.
      */
 
-    g_assert(qnull_.refcnt == 1);
-    obj = qnull();
+    g_assert(qnull_.base.refcnt == 1);
+    obj = QOBJECT(qnull());
     v = qobject_input_visitor_new(obj);
     qobject_decref(obj);
     visit_type_null(v, NULL, &error_abort);
@@ -55,11 +55,11 @@ static void qnull_visit_test(void)
     v = qobject_output_visitor_new(&obj);
     visit_type_null(v, NULL, &error_abort);
     visit_complete(v, &obj);
-    g_assert(obj == &qnull_);
+    g_assert(obj == QOBJECT(&qnull_));
     qobject_decref(obj);
     visit_free(v);
 
-    g_assert(qnull_.refcnt == 1);
+    g_assert(qnull_.base.refcnt == 1);
 }
 
 int main(int argc, char **argv)