aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qlist.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-07 20:36:00 +0400
committerMarkus Armbruster <armbru@redhat.com>2017-06-20 14:31:31 +0200
commit36aeb6094f04bed036c43c5e0eb675ca78bf72fe (patch)
tree7d9b3f896df89da6c85f71887d4eaa711c3e2579 /tests/check-qlist.c
parent60390d2dc85ffade8981ca41e02335cb07353a6d (diff)
tests: remove /{qnum, qlist, dict}/destroy test
The tests aren't really useful, or already covered by other simple tests. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170607163635.17635-9-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests/check-qlist.c')
-rw-r--r--tests/check-qlist.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/tests/check-qlist.c b/tests/check-qlist.c
index a9b65c6239..894e9915e5 100644
--- a/tests/check-qlist.c
+++ b/tests/check-qlist.c
@@ -30,8 +30,7 @@ static void qlist_new_test(void)
g_assert(qlist->base.refcnt == 1);
g_assert(qobject_type(QOBJECT(qlist)) == QTYPE_QLIST);
- // destroy doesn't exist yet
- g_free(qlist);
+ QDECREF(qlist);
}
static void qlist_append_test(void)
@@ -49,10 +48,7 @@ static void qlist_append_test(void)
g_assert(entry != NULL);
g_assert(entry->value == QOBJECT(qi));
- // destroy doesn't exist yet
- QDECREF(qi);
- g_free(entry);
- g_free(qlist);
+ QDECREF(qlist);
}
static void qobject_to_qlist_test(void)
@@ -63,20 +59,6 @@ static void qobject_to_qlist_test(void)
g_assert(qobject_to_qlist(QOBJECT(qlist)) == qlist);
- // destroy doesn't exist yet
- g_free(qlist);
-}
-
-static void qlist_destroy_test(void)
-{
- int i;
- QList *qlist;
-
- qlist = qlist_new();
-
- for (i = 0; i < 42; i++)
- qlist_append_int(qlist, i);
-
QDECREF(qlist);
}
@@ -125,7 +107,6 @@ int main(int argc, char **argv)
g_test_add_func("/public/new", qlist_new_test);
g_test_add_func("/public/append", qlist_append_test);
g_test_add_func("/public/to_qlist", qobject_to_qlist_test);
- g_test_add_func("/public/destroy", qlist_destroy_test);
g_test_add_func("/public/iter", qlist_iter_test);
return g_test_run();