Improve strfuncs tests coverage

This commit is contained in:
Matthias Clasen 2012-08-18 14:41:35 -04:00
parent 58c7747c50
commit 2c338e21d6

View File

@ -567,6 +567,13 @@ test_strreverse (void)
g_free (str);
}
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)
{
@ -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);