Tue, 20 Sep 2022 10:30:54 +0200
add tests for strupper and strlower
test/test_string.cpp | file | annotate | diff | comparison | revisions |
--- a/test/test_string.cpp Tue Sep 20 10:24:03 2022 +0200 +++ b/test/test_string.cpp Tue Sep 20 10:30:54 2022 +0200 @@ -597,3 +597,17 @@ cx_strfree(&replcs1); cx_strfree(&replcs2); } + +TEST(String, strupper) { + cxmutstr str = cx_strdup(cx_str("thIs 1s @ Te$t")); + cx_strupper(str); + EXPECT_STREQ(str.ptr, "THIS 1S @ TE$T"); + cx_strfree(&str); +} + +TEST(String, strlower) { + cxmutstr str = cx_strdup(cx_str("thIs 1s @ Te$t")); + cx_strlower(str); + EXPECT_STREQ(str.ptr, "this 1s @ te$t"); + cx_strfree(&str); +}