From db1c83a5163dab40673b1c5cdf23fdff771ebaf3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 29 May 2013 08:34:24 -0400 Subject: [PATCH] Improve gtype test coverage --- tests/refcount/objects.c | 3 +++ tests/refcount/properties.c | 2 ++ tests/refcount/properties2.c | 2 ++ tests/refcount/properties4.c | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/tests/refcount/objects.c b/tests/refcount/objects.c index 9ff3b60..e45db23 100644 --- a/tests/refcount/objects.c +++ b/tests/refcount/objects.c @@ -150,6 +150,9 @@ main (int argc, char **argv) g_thread_join (thread); } + g_object_unref (test1); + g_object_unref (test2); + g_print ("stopped\n"); return 0; diff --git a/tests/refcount/properties.c b/tests/refcount/properties.c index d96a012..5a7020c 100644 --- a/tests/refcount/properties.c +++ b/tests/refcount/properties.c @@ -183,6 +183,8 @@ run_thread (GTest * test) } } + g_object_unref (test); + return NULL; } diff --git a/tests/refcount/properties2.c b/tests/refcount/properties2.c index 577e33e..27e0309 100644 --- a/tests/refcount/properties2.c +++ b/tests/refcount/properties2.c @@ -193,5 +193,7 @@ main (int argc, char **argv) g_assert (count == test->dummy); + g_object_unref (test); + return 0; } diff --git a/tests/refcount/properties4.c b/tests/refcount/properties4.c index 2512160..94b704a 100644 --- a/tests/refcount/properties4.c +++ b/tests/refcount/properties4.c @@ -151,6 +151,7 @@ int main (int argc, char **argv) { MyBadger * badger1, * badger2; + gpointer test; g_print ("START: %s\n", argv[0]); g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL | g_log_set_always_fatal (G_LOG_FATAL_MASK)); @@ -161,6 +162,9 @@ main (int argc, char **argv) g_object_set (badger1, "mama", badger2, NULL); g_assert_cmpuint (badger1->mama_notify_count, ==, 1); g_assert_cmpuint (badger2->mama_notify_count, ==, 1); + g_object_get (badger1, "mama", &test, NULL); + g_assert (test == badger2); + g_object_unref (test); g_object_unref (badger1); g_object_unref (badger2); -- 2.7.4