diff options
author | Ted Gould <ted@canonical.com> | 2009-10-08 16:29:36 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-08 16:29:36 -0400 |
commit | 4658844f6c1d0e4352ee7baf0e7fcf56bde01d10 (patch) | |
tree | e9b60925edaeb1b46fdc2f227408accbd78f7be6 /tests | |
parent | 1386478a87fd0f228dd31a00d8f3d969d6a6a98c (diff) | |
download | libayatana-indicator-4658844f6c1d0e4352ee7baf0e7fcf56bde01d10.tar.gz libayatana-indicator-4658844f6c1d0e4352ee7baf0e7fcf56bde01d10.tar.bz2 libayatana-indicator-4658844f6c1d0e4352ee7baf0e7fcf56bde01d10.zip |
Test to build the object and unref it.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-loader.c | 16 |
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; } |