From 36aeb6094f04bed036c43c5e0eb675ca78bf72fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 7 Jun 2017 20:36:00 +0400 Subject: tests: remove /{qnum, qlist, dict}/destroy test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests aren't really useful, or already covered by other simple tests. Signed-off-by: Marc-André Lureau Message-Id: <20170607163635.17635-9-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/check-qnum.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'tests/check-qnum.c') diff --git a/tests/check-qnum.c b/tests/check-qnum.c index d94cea0..da7e0b0 100644 --- a/tests/check-qnum.c +++ b/tests/check-qnum.c @@ -36,8 +36,7 @@ static void qnum_from_int_test(void) g_assert_cmpint(qn->base.refcnt, ==, 1); g_assert_cmpint(qobject_type(QOBJECT(qn)), ==, QTYPE_QNUM); - // destroy doesn't exit yet - g_free(qn); + QDECREF(qn); } static void qnum_from_double_test(void) @@ -52,8 +51,7 @@ static void qnum_from_double_test(void) g_assert_cmpint(qn->base.refcnt, ==, 1); g_assert_cmpint(qobject_type(QOBJECT(qn)), ==, QTYPE_QNUM); - // destroy doesn't exit yet - g_free(qn); + QDECREF(qn); } static void qnum_from_int64_test(void) @@ -109,24 +107,12 @@ static void qnum_to_string_test(void) QDECREF(qn); } -static void qnum_destroy_test(void) -{ - QNum *qn; - - qn = qnum_from_int(0); - QDECREF(qn); - - qn = qnum_from_double(0.42); - QDECREF(qn); -} - int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/qnum/from_int", qnum_from_int_test); g_test_add_func("/qnum/from_double", qnum_from_double_test); - g_test_add_func("/qnum/destroy", qnum_destroy_test); g_test_add_func("/qnum/from_int64", qnum_from_int64_test); g_test_add_func("/qnum/get_int", qnum_get_int_test); g_test_add_func("/qnum/to_qnum", qobject_to_qnum_test); -- cgit v1.1