diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-07-04 10:41:16 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-07-04 10:51:39 +0200 |
commit | c670fb9afe886f26448a8a4654a3b52a90386c1f (patch) | |
tree | 987ff87167a32e429b6fb3fab226792be9e60aac | |
parent | 645710b4e199855985f00f8843fb8459f992ff6d (diff) | |
download | geocode-glib-c670fb9afe886f26448a8a4654a3b52a90386c1f.tar.gz |
tests: Check that setlocale() succeeded
-rw-r--r-- | geocode-glib/tests/geocode-glib.c | 8 |
1 files 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"); |