From bce9f5143bfbe49972aebe3fa3e0a4566e2502b7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 17:57:14 -0400 Subject: A test to load the dummy indicator --- tests/test-loader.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/test-loader.c b/tests/test-loader.c index 85cb924..3e94981 100644 --- a/tests/test-loader.c +++ b/tests/test-loader.c @@ -1,6 +1,23 @@ #include #include "libindicator/indicator-object.h" +void destroy_cb (gpointer data, GObject * object); + +void +test_loader_filename_dummy_null (void) +{ + IndicatorObject * object = indicator_object_new_from_file("./.libs/libdummy-indicator-null.so"); + g_assert(object != NULL); + + gboolean unreffed = FALSE; + g_object_weak_ref(G_OBJECT(object), destroy_cb, &unreffed); + + g_object_unref(object); + g_assert(unreffed == TRUE); + + return; +} + void test_loader_filename_bad (void) { @@ -37,6 +54,7 @@ test_loader_creation_deletion_suite (void) { g_test_add_func ("/libindicator/loader/ref_and_unref", test_loader_refunref); g_test_add_func ("/libindicator/loader/filename_bad", test_loader_filename_bad); + g_test_add_func ("/libindicator/loader/dummy/null_load", test_loader_filename_dummy_null); return; } -- cgit v1.2.3