aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-08 17:57:14 -0400
committerTed Gould <ted@canonical.com>2009-10-08 17:57:14 -0400
commitbce9f5143bfbe49972aebe3fa3e0a4566e2502b7 (patch)
tree57da878141379f4546e595966a7a5324659eff51
parent1b828c9f669ce1364618387d13fc8a134244e2ba (diff)
downloadlibayatana-indicator-bce9f5143bfbe49972aebe3fa3e0a4566e2502b7.tar.gz
libayatana-indicator-bce9f5143bfbe49972aebe3fa3e0a4566e2502b7.tar.bz2
libayatana-indicator-bce9f5143bfbe49972aebe3fa3e0a4566e2502b7.zip
A test to load the dummy indicator
-rw-r--r--tests/test-loader.c18
1 files changed, 18 insertions, 0 deletions
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 <glib.h>
#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;
}