gpointing-device-settings r185 - in trunk: . test
- From: hiikezoe svn gnome org
- To: svn-commits-list gnome org
- Subject: gpointing-device-settings r185 - in trunk: . test
- Date: Mon, 9 Mar 2009 03:23:34 +0000 (UTC)
Author: hiikezoe
Date: Mon Mar 9 03:23:33 2009
New Revision: 185
URL: http://svn.gnome.org/viewvc/gpointing-device-settings?rev=185&view=rev
Log:
add tests.
Added:
trunk/test/test-gconf.c
trunk/test/test-utils.c
Modified:
trunk/configure.ac
trunk/test/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Mar 9 03:23:33 2009
@@ -137,6 +137,7 @@
GENHTML_OPTIONS="--title 'GPointingDeviceSettings Code Coverage'"
GPDS_CFLAGS="$XINPUT_CFLAGS $GTK_CFLAGS"
+GPDS_CFLAGS="$GPDS_CFLAGS $GCONF2_CFLAGS"
GPDS_CFLAGS="$GPDS_CFLAGS -DGTK_DISABLE_DEPRECATED"
GPDS_CFLAGS="$GPDS_CFLAGS -DGDK_DISABLE_DEPRECATED"
GPDS_CFLAGS="$GPDS_CFLAGS -DG_DISABLE_DEPRECATED"
Modified: trunk/test/Makefile.am
==============================================================================
--- trunk/test/Makefile.am (original)
+++ trunk/test/Makefile.am Mon Mar 9 03:23:33 2009
@@ -4,11 +4,13 @@
noinst_LTLIBRARIES = \
suite_gpds_test.la \
+ test-gconf.la \
test-xinput.la \
test-xinput-pointer-info.la \
test-xinput-utils.la \
test-module.la \
- test-ui.la
+ test-ui.la \
+ test-utils.la
endif
EXTRA_DIST = \
@@ -21,7 +23,7 @@
AM_CFLAGS = \
$(GCUTTER_CFLAGS) \
- $(GTK_CFLAGS)
+ $(GPDS_CFLAGS)
AM_LDFLAGS = \
-module \
@@ -36,11 +38,13 @@
suite_gpds_test_la_SOURCES = gpds-test-suite.c
+test_gconf_la_SOURCES = test-gconf.c
test_xinput_la_SOURCES = test-xinput.c
test_xinput_pointer_info_la_SOURCES = test-xinput-pointer-info.c
test_xinput_utils_la_SOURCES = test-xinput-utils.c
test_module_la_SOURCES = test-module.c
test_ui_la_SOURCES = test-ui.c
+test_utils_la_SOURCES = test-utils.c
echo-cutter:
@echo $(CUTTER)
Added: trunk/test/test-gconf.c
==============================================================================
--- (empty file)
+++ trunk/test/test-gconf.c Mon Mar 9 03:23:33 2009
@@ -0,0 +1,29 @@
+#include "gpds-gconf.h"
+
+#include <gcutter.h>
+
+void test_get_key_from_path (void);
+
+static const gchar *key;
+
+void
+setup (void)
+{
+ key = NULL;
+}
+
+void
+teardown (void)
+{
+}
+
+void
+test_get_key_from_path (void)
+{
+ key = gpds_gconf_get_key_from_path("/desktop/gnome/peripherals/TPPS 47@2 32@IBM 32@TrackPoint/middle_button_emulation");
+ cut_assert_equal_string("middle_button_emulation", key);
+}
+
+/*
+vi:ts=4:nowrap:ai:expandtab:sw=4
+*/
Added: trunk/test/test-utils.c
==============================================================================
--- (empty file)
+++ trunk/test/test-utils.c Mon Mar 9 03:23:33 2009
@@ -0,0 +1,36 @@
+#include "gpds-utils.h"
+
+#include <gcutter.h>
+
+void test_get_ui_file_directory (void);
+
+static gchar *ui_dir;
+
+void
+setup (void)
+{
+ ui_dir = NULL;
+ if (g_getenv("GPDS_UI_DIR")) {
+ ui_dir = g_strdup(g_getenv("GPDS_UI_DIR"));
+ g_unsetenv("GPDS_UI_DIR");
+ }
+}
+
+void
+teardown (void)
+{
+ if (ui_dir)
+ g_setenv("GPDS_UI_DIR", ui_dir, FALSE);
+ g_free(ui_dir);
+}
+
+void
+test_get_ui_file_directory (void)
+{
+ cut_assert_equal_string(GPDS_UIDIR,
+ gpds_get_ui_file_directory());
+}
+
+/*
+vi:ts=4:nowrap:ai:expandtab:sw=4
+*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]