diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-07 20:36:00 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-06-20 14:31:31 +0200 |
commit | 36aeb6094f04bed036c43c5e0eb675ca78bf72fe (patch) | |
tree | 7d9b3f896df89da6c85f71887d4eaa711c3e2579 /tests/check-qnum.c | |
parent | 60390d2dc85ffade8981ca41e02335cb07353a6d (diff) | |
download | qemu-36aeb6094f04bed036c43c5e0eb675ca78bf72fe.zip qemu-36aeb6094f04bed036c43c5e0eb675ca78bf72fe.tar.gz qemu-36aeb6094f04bed036c43c5e0eb675ca78bf72fe.tar.bz2 |
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-qnum.c')
-rw-r--r-- | tests/check-qnum.c | 18 |
1 files changed, 2 insertions, 16 deletions
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); |