mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
tests: split tests on functions string_tolower and string_toupper
This commit is contained in:
@@ -157,6 +157,23 @@ TEST(CoreString, Strndup)
|
||||
/*
|
||||
* Tests functions:
|
||||
* string_tolower
|
||||
*/
|
||||
|
||||
TEST(CoreString, ToLower)
|
||||
{
|
||||
char *str;
|
||||
|
||||
str = strdup ("ABC");
|
||||
|
||||
string_tolower (NULL);
|
||||
string_tolower (str);
|
||||
STRCMP_EQUAL("abc", str);
|
||||
|
||||
free (str);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tests functions:
|
||||
* string_toupper
|
||||
*/
|
||||
|
||||
@@ -164,10 +181,9 @@ TEST(CoreString, Case)
|
||||
{
|
||||
char *str;
|
||||
|
||||
str = strdup ("ABC");
|
||||
str = strdup ("abc");
|
||||
|
||||
string_tolower (str);
|
||||
STRCMP_EQUAL("abc", str);
|
||||
string_toupper (NULL);
|
||||
string_toupper (str);
|
||||
STRCMP_EQUAL("ABC", str);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user