aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qnum.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check-qnum.c')
-rw-r--r--tests/check-qnum.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/check-qnum.c b/tests/check-qnum.c
index 9187da734b..4105015872 100644
--- a/tests/check-qnum.c
+++ b/tests/check-qnum.c
@@ -35,7 +35,7 @@ static void qnum_from_int_test(void)
g_assert_cmpint(qn->base.refcnt, ==, 1);
g_assert_cmpint(qobject_type(QOBJECT(qn)), ==, QTYPE_QNUM);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_from_uint_test(void)
@@ -50,7 +50,7 @@ static void qnum_from_uint_test(void)
g_assert(qn->base.refcnt == 1);
g_assert(qobject_type(QOBJECT(qn)) == QTYPE_QNUM);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_from_double_test(void)
@@ -65,7 +65,7 @@ static void qnum_from_double_test(void)
g_assert_cmpint(qn->base.refcnt, ==, 1);
g_assert_cmpint(qobject_type(QOBJECT(qn)), ==, QTYPE_QNUM);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_from_int64_test(void)
@@ -76,7 +76,7 @@ static void qnum_from_int64_test(void)
qn = qnum_from_int(value);
g_assert_cmpint((int64_t) qn->u.i64, ==, value);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_get_int_test(void)
@@ -87,7 +87,7 @@ static void qnum_get_int_test(void)
qn = qnum_from_int(value);
g_assert_cmpint(qnum_get_int(qn), ==, value);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_get_uint_test(void)
@@ -100,25 +100,25 @@ static void qnum_get_uint_test(void)
qn = qnum_from_uint(value);
g_assert(qnum_get_try_uint(qn, &val));
g_assert_cmpuint(val, ==, value);
- QDECREF(qn);
+ qobject_unref(qn);
qn = qnum_from_int(value);
g_assert(qnum_get_try_uint(qn, &val));
g_assert_cmpuint(val, ==, value);
- QDECREF(qn);
+ qobject_unref(qn);
/* invalid cases */
qn = qnum_from_int(-1);
g_assert(!qnum_get_try_uint(qn, &val));
- QDECREF(qn);
+ qobject_unref(qn);
qn = qnum_from_uint(-1ULL);
g_assert(!qnum_get_try_int(qn, &ival));
- QDECREF(qn);
+ qobject_unref(qn);
qn = qnum_from_double(0.42);
g_assert(!qnum_get_try_uint(qn, &val));
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qobject_to_qnum_test(void)
@@ -127,11 +127,11 @@ static void qobject_to_qnum_test(void)
qn = qnum_from_int(0);
g_assert(qobject_to(QNum, QOBJECT(qn)) == qn);
- QDECREF(qn);
+ qobject_unref(qn);
qn = qnum_from_double(0);
g_assert(qobject_to(QNum, QOBJECT(qn)) == qn);
- QDECREF(qn);
+ qobject_unref(qn);
}
static void qnum_to_string_test(void)
@@ -143,13 +143,13 @@ static void qnum_to_string_test(void)
tmp = qnum_to_string(qn);
g_assert_cmpstr(tmp, ==, "123456");
g_free(tmp);
- QDECREF(qn);
+ qobject_unref(qn);
qn = qnum_from_double(0.42);
tmp = qnum_to_string(qn);
g_assert_cmpstr(tmp, ==, "0.42");
g_free(tmp);
- QDECREF(qn);
+ qobject_unref(qn);
}
int main(int argc, char **argv)