[tracker/tracker-0.10] tests, libtracker-common: Fix tests when meegotouch is enabled



commit bfca8e67f07e05ce6ccae49fbb92fa737aabcc18
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Apr 21 16:22:35 2011 +0200

    tests, libtracker-common: Fix tests when meegotouch is enabled

 tests/libtracker-common/tracker-file-utils-test.c |    4 ++++
 tests/libtracker-common/tracker-utils-test.c      |   11 ++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/tests/libtracker-common/tracker-file-utils-test.c b/tests/libtracker-common/tracker-file-utils-test.c
index 157e410..e8268f0 100644
--- a/tests/libtracker-common/tracker-file-utils-test.c
+++ b/tests/libtracker-common/tracker-file-utils-test.c
@@ -23,6 +23,7 @@
 #include <gio/gio.h>
 
 #include <libtracker-common/tracker-file-utils.h>
+#include <libtracker-common/tracker-locale.h>
 
 #include <tracker-test-helpers.h>
 
@@ -188,6 +189,7 @@ main (int argc, char **argv)
 	g_type_init ();
 	g_test_init (&argc, &argv, NULL);
 
+	tracker_locale_init ();
 
 	g_test_add_func ("/tracker/libtracker-common/tracker-file-utils/path_evaluate_name",
 	                 test_path_evaluate_name);
@@ -200,5 +202,7 @@ main (int argc, char **argv)
 
 	result = g_test_run ();
 
+	tracker_locale_shutdown ();
+
 	return result;
 }
diff --git a/tests/libtracker-common/tracker-utils-test.c b/tests/libtracker-common/tracker-utils-test.c
index 0f1f19a..504ae80 100644
--- a/tests/libtracker-common/tracker-utils-test.c
+++ b/tests/libtracker-common/tracker-utils-test.c
@@ -22,6 +22,7 @@
 
 #include <glib-object.h>
 #include <libtracker-common/tracker-utils.h>
+#include <libtracker-common/tracker-locale.h>
 
 static void
 test_seconds_to_string ()
@@ -76,14 +77,22 @@ test_seconds_estimate_to_string ()
 int
 main (int argc, char **argv)
 {
+	gboolean ret;
+
 	g_type_init ();
 	g_test_init (&argc, &argv, NULL);
 
+	tracker_locale_init ();
+
 	g_test_add_func ("/libtracker-common/tracker-utils/seconds_to_string",
 	                 test_seconds_to_string);
 
 	g_test_add_func ("/libtracker-common/tracker-utils/seconds_estimate_to_string",
 	                 test_seconds_estimate_to_string);
 
-	return g_test_run ();
+	ret = g_test_run ();
+
+	tracker_locale_shutdown ();
+
+	return ret;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]