[geocode-glib/wip/hadess/check-setlocale] tests: Check that setlocale() succeeded
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geocode-glib/wip/hadess/check-setlocale] tests: Check that setlocale() succeeded
- Date: Mon, 4 Jul 2022 08:42:02 +0000 (UTC)
commit e35818d1fde7f2e05c27fd957f8d03495962be79
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jul 4 10:41:16 2022 +0200
tests: Check that setlocale() succeeded
geocode-glib/tests/geocode-glib.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/geocode-glib/tests/geocode-glib.c b/geocode-glib/tests/geocode-glib.c
index ef20716..48cb708 100644
--- a/geocode-glib/tests/geocode-glib.c
+++ b/geocode-glib/tests/geocode-glib.c
@@ -416,7 +416,7 @@ test_pi (void)
GeocodePlace *place;
old_locale = g_strdup (setlocale(LC_ALL, NULL));
- setlocale (LC_ALL, "en_GB.UTF-8");
+ g_assert_nonnull (setlocale (LC_ALL, "en_GB.UTF-8"));
/* The query parameters the mock server expects to receive. */
params = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
@@ -503,7 +503,7 @@ test_search (void)
got_texas = FALSE;
old_locale = g_strdup (setlocale(LC_MESSAGES, NULL));
- setlocale (LC_MESSAGES, "en_GB.UTF-8");
+ g_assert_nonnull (setlocale (LC_MESSAGES, "en_GB.UTF-8"));
/* The query parameters the mock server expects to receive. */
params = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
@@ -698,7 +698,7 @@ test_locale_format (void)
old_locale = g_strdup (setlocale(LC_ADDRESS, NULL));
/* Set to a locale that has number after street */
- setlocale (LC_ADDRESS, "sv_SE.utf8");
+ g_assert_nonnull (setlocale (LC_ADDRESS, "sv_SE.utf8"));
/* The query parameters the mock server expects to receive. */
params = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
@@ -749,7 +749,7 @@ test_locale_name (void)
add_attr_string (params, "bounded", "0");
/* Check Moscow's name in Czech */
- setlocale (LC_MESSAGES, "cs_CZ.UTF-8");
+ g_assert_nonnull (setlocale (LC_MESSAGES, "cs_CZ.UTF-8"));
object = create_forward_for_string ("moscow", params,
"locale_name.json");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]