[glib] tests: Use g_test_skip() instead of a message in GDateTime tests



commit 0dc68e5d469654d6e4b35d73f48c9ec550dcdfb4
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Nov 21 12:42:42 2017 +0000

    tests: Use g_test_skip() instead of a message in GDateTime tests
    
    There are some GDateTime tests which need to be skipped if changing the
    locale fails. Use g_test_skip() to do that, rather than just a
    human-readable message.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/tests/gdatetime.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 03a7935..fc117e2 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -1415,14 +1415,13 @@ test_non_utf8_printf (void)
   setlocale (LC_ALL, "ja_JP.eucjp");
   if (strstr (setlocale (LC_ALL, NULL), "ja_JP") == NULL)
     {
-      g_test_message ("locale ja_JP.eucjp not available, skipping non-UTF8 tests");
+      g_test_skip ("locale ja_JP.eucjp not available, skipping non-UTF8 tests");
       g_free (oldlocale);
       return;
     }
   if (g_get_charset (NULL))
     {
-      g_test_message ("locale ja_JP.eucjp may be available, but glib seems to think that it's equivalent to 
UTF-8, skipping non-UTF-8 tests.");
-      g_test_message ("This is a known issue on Darwin");
+      g_test_skip ("locale ja_JP.eucjp may be available, but glib seems to think that it's equivalent to 
UTF-8, skipping non-UTF-8 tests. This is a known issue on Darwin");
       setlocale (LC_ALL, oldlocale);
       g_free (oldlocale);
       return;
@@ -1545,7 +1544,7 @@ test_modifiers (void)
       TEST_PRINTF_DATE (2011, 7, 1, "%_Om", " \333\267");        /* ' 7' */
     }
   else
-    g_test_message ("locale fa_IR not available, skipping O modifier tests");
+    g_test_skip ("locale fa_IR not available, skipping O modifier tests");
   setlocale (LC_ALL, oldlocale);
   g_free (oldlocale);
 }


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