diff options
author | Ted Gould <ted@canonical.com> | 2009-10-08 17:11:47 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-08 17:11:47 -0400 |
commit | d946049ea36d1c6a0946750655eac070566f4974 (patch) | |
tree | cb4675a027c95a32f2bd3b969aa3ab83b3327cac /tests | |
parent | b4d20eb0049cc36dbdd03754f820bd46df6e60ec (diff) | |
download | libayatana-indicator-d946049ea36d1c6a0946750655eac070566f4974.tar.gz libayatana-indicator-d946049ea36d1c6a0946750655eac070566f4974.tar.bz2 libayatana-indicator-d946049ea36d1c6a0946750655eac070566f4974.zip |
Adding a test that should pass as given a bad filename we should get no object back.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-loader.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -2,6 +2,14 @@ #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) { gboolean * bob = (gboolean *)data; @@ -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; } |