aboutsummaryrefslogtreecommitdiff
path: root/tests/test-desktop-shortcuts.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-16 15:24:51 -0600
committerTed Gould <ted@gould.cx>2010-02-16 15:24:51 -0600
commit53c9f60b7438764853c54d977a37b267bdf64485 (patch)
treecfe75f26927c40a449ad8d34fa3e324a92a68e02 /tests/test-desktop-shortcuts.c
parent1a85eb2ce73907d4f9b11a05efbc3f5c2c77e82a (diff)
downloadlibayatana-indicator-53c9f60b7438764853c54d977a37b267bdf64485.tar.gz
libayatana-indicator-53c9f60b7438764853c54d977a37b267bdf64485.tar.bz2
libayatana-indicator-53c9f60b7438764853c54d977a37b267bdf64485.zip
Adding in a basic test desktop file test
Diffstat (limited to 'tests/test-desktop-shortcuts.c')
-rw-r--r--tests/test-desktop-shortcuts.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/test-desktop-shortcuts.c b/tests/test-desktop-shortcuts.c
new file mode 100644
index 0000000..3368c9e
--- /dev/null
+++ b/tests/test-desktop-shortcuts.c
@@ -0,0 +1,38 @@
+#include <gtk/gtk.h>
+#include "libindicator/indicator-desktop-shortcuts.h"
+
+void
+test_desktop_shortcuts_creation (void)
+{
+
+ IndicatorDesktopShortcuts * ids = indicator_desktop_shortcuts_new(SRCDIR "/test-well-formed.desktop", "France");
+ g_assert(ids != NULL);
+
+ g_object_add_weak_pointer(G_OBJECT(ids), (gpointer *)&ids);
+ g_object_unref(G_OBJECT(ids));
+
+ g_assert(ids == NULL);
+ return;
+}
+
+void
+test_desktop_shortcuts_suite (void)
+{
+ g_test_add_func ("/libindicator/desktopshortcuts/creation", test_desktop_shortcuts_creation);
+
+ return;
+}
+
+int
+main (int argc, char ** argv)
+{
+ g_type_init ();
+ g_test_init (&argc, &argv, NULL);
+ gtk_init(&argc, &argv);
+
+ test_desktop_shortcuts_suite();
+
+ g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL);
+
+ return g_test_run();
+}