[glib] Improve strfuncs tests coverage



commit 2c338e21d6f86bad96283d5388991dc4c4b34361
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 18 14:41:35 2012 -0400

    Improve strfuncs tests coverage

 glib/tests/strfuncs.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/strfuncs.c b/glib/tests/strfuncs.c
index 9b2d1d6..8e376f7 100644
--- a/glib/tests/strfuncs.c
+++ b/glib/tests/strfuncs.c
@@ -568,6 +568,13 @@ test_strreverse (void)
 }
 
 static void
+test_strncasecmp (void)
+{
+  g_assert (g_strncasecmp ("abc1", "ABC2", 3) == 0);
+  g_assert (g_strncasecmp ("abc1", "ABC2", 4) != 0);
+}
+
+static void
 test_strstr (void)
 {
   gchar *haystack;
@@ -1340,6 +1347,7 @@ main (int   argc,
   g_test_add_func ("/strfuncs/strchug", test_strchug);
   g_test_add_func ("/strfuncs/strchomp", test_strchomp);
   g_test_add_func ("/strfuncs/strreverse", test_strreverse);
+  g_test_add_func ("/strfuncs/strncasecmp", test_strncasecmp);
   g_test_add_func ("/strfuncs/strstr", test_strstr);
   g_test_add_func ("/strfuncs/has-prefix", test_has_prefix);
   g_test_add_func ("/strfuncs/has-suffix", test_has_suffix);



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