aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-loader.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test-loader.c b/tests/test-loader.c
index 7e77195..68bfe48 100644
--- a/tests/test-loader.c
+++ b/tests/test-loader.c
@@ -2,8 +2,24 @@
#include "libindicator/indicator-object.h"
void
+destroy_cb (gpointer data)
+{
+ gboolean * bob = (gboolean *)data;
+ *bob = TRUE;
+ return;
+}
+
+void
test_loader_refunref (void)
{
+ GObject * object = g_object_new(INDICATOR_OBJECT_TYPE, NULL);
+
+ gboolean unreffed = FALSE;
+ g_signal_connect(object, "destroy", G_CALLBACK(destroy_cb), &unreffed);
+
+ g_object_unref(object);
+
+ g_assert(unreffed == TRUE);
return;
}