From d946049ea36d1c6a0946750655eac070566f4974 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 8 Oct 2009 17:11:47 -0400 Subject: Adding a test that should pass as given a bad filename we should get no object back. --- tests/test-loader.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/test-loader.c') diff --git a/tests/test-loader.c b/tests/test-loader.c index f754685..85cb924 100644 --- a/tests/test-loader.c +++ b/tests/test-loader.c @@ -1,6 +1,14 @@ #include #include "libindicator/indicator-object.h" +void +test_loader_filename_bad (void) +{ + IndicatorObject * object = indicator_object_new_from_file("/this/file/should/not/exist.so"); + g_assert(object == NULL); + return; +} + void destroy_cb (gpointer data, GObject * object) { @@ -28,6 +36,7 @@ void 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); return; } -- cgit v1.2.3