[Galago-commits] r2324 - in trunk/libgalago: . tests
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sat Nov 19 15:48:16 PST 2005
Author: chipx86
Date: 2005-11-19 15:48:13 -0800 (Sat, 19 Nov 2005)
New Revision: 2324
Modified:
trunk/libgalago/ChangeLog
trunk/libgalago/tests/check-libgalago.c
Log:
Remove old cruft from the very limited test suite, and add some new checks (which fail currently).
Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog 2005-11-19 23:42:30 UTC (rev 2323)
+++ trunk/libgalago/ChangeLog 2005-11-19 23:48:13 UTC (rev 2324)
@@ -1,3 +1,9 @@
+Sat Nov 19 15:47:48 PST 2005 Christian Hammond <chipx86 at chipx86.com>
+
+ * tests/check-libgalago.c:
+ - Remove old cruft from the very limited test suite, and add some new
+ checks (which fail currently).
+
Sat Nov 19 15:41:18 PST 2005 Christian Hammond <chipx86 at chipx86.com>
* libgalago/galago-account.c:
Modified: trunk/libgalago/tests/check-libgalago.c
===================================================================
--- trunk/libgalago/tests/check-libgalago.c 2005-11-19 23:42:30 UTC (rev 2323)
+++ trunk/libgalago/tests/check-libgalago.c 2005-11-19 23:48:13 UTC (rev 2324)
@@ -26,26 +26,31 @@
/**************************************************************************
- * Hashtable tests
+ * libgalago tests
**************************************************************************/
-START_TEST(test_hashtable_replace)
+START_TEST(test_dbus_signatures)
{
- GHashTable *table;
-
- table = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);
- g_hash_table_insert(table, g_strdup("key"), g_strdup("foo"));
- g_hash_table_replace(table, g_strdup("key"), g_strdup("bar"));
-
- fail_unless(!strcmp((char *)g_hash_table_lookup(table, "key"), "bar"),
- "New hashtable item 'bar' wasn't found after "
- "g_hash_table_replace");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_ACCOUNT) != NULL,
+ "GalagoAccount's D-BUS signature is NULL");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_IMAGE) != NULL,
+ "GalagoImage's D-BUS signature is NULL");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_PERSON) != NULL,
+ "GalagoPerson's D-BUS signature is NULL");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_PRESENCE) != NULL,
+ "GalagoPresence's D-BUS signature is NULL");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_SERVICE) != NULL,
+ "GalagoService's D-BUS signature is NULL");
+ fail_unless(
+ galago_object_type_get_dbus_signature(GALAGO_TYPE_STATUS) != NULL,
+ "GalagoStatus's D-BUS signature is NULL");
}
END_TEST
-
-/**************************************************************************
- * libgalago tests
- **************************************************************************/
START_TEST(test_init_reinit)
{
fail_unless(galago_init("check-libgalago", FALSE),
@@ -84,11 +89,9 @@
/* Core test */
ADD_TCASE("core", test_core);
- /* hashtable tests*/
- ADD_TCASE("hashtable_replace", test_hashtable_replace);
-
/* libgalago tests */
- ADD_TCASE("init_reinit", test_init_reinit);
+ ADD_TCASE("init_reinit", test_init_reinit); /* This MUST run first! */
+ ADD_TCASE("dbus_signatures", test_dbus_signatures);
return s;
}
@@ -115,6 +118,8 @@
galago_log_set_handler(GALAGO_LOG_FATAL, error_handler, NULL);
galago_log_set_handler(GALAGO_LOG_ASSERT, error_handler, NULL);
+ g_type_init();
+
s = make_libgalago_suite();
sr = srunner_create(s);
More information about the galago-commits
mailing list