gpointing-device-settings r12 - trunk/test
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r12 - trunk/test
- Date: Thu, 26 Feb 2009 07:27:44 +0000 (UTC)
Author: hiikezoe
Date: Thu Feb 26 07:27:44 2009
New Revision: 12
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=12&view=rev
Log:
load all modules in cut_startup, unload all modules in cut_shutdown.
Modified:
trunk/test/test-module.c
Modified: trunk/test/test-module.c
==============================================================================
--- trunk/test/test-module.c (original)
+++ trunk/test/test-module.c Thu Feb 26 07:27:44 2009
@@ -14,10 +14,23 @@
static GObject *object;
void
+cut_startup (void)
+{
+ modules = gpds_module_load_modules();
+}
+
+void
+cut_shutdown (void)
+{
+ g_list_foreach(modules, (GFunc)gpds_module_unload, NULL);
+ g_list_free(modules);
+ modules = NULL;
+}
+
+void
setup (void)
{
module = NULL;
- modules = NULL;
names = NULL;
expected_names = NULL;
object = NULL;
@@ -29,26 +42,16 @@
{
if (object)
g_object_unref(object);
- g_list_free(modules);
g_list_free(names);
g_list_free(expected_names);
}
void
-test_load_modules (void)
-{
- modules = gpds_module_load_modules();
- cut_assert(modules);
-}
-
-void
test_collect_names (void)
{
expected_names = g_list_append(expected_names, "touchpad");
expected_names = g_list_append(expected_names, "trackpoint");
- cut_trace(test_load_modules());
-
names = gpds_module_collect_names(modules);
gcut_assert_equal_list_string(expected_names, names);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]