Tue, 20 Sep 2022 10:30:54 +0200
add tests for strupper and strlower
test/test_string.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/test/test_string.cpp Tue Sep 20 10:24:03 2022 +0200 1.2 +++ b/test/test_string.cpp Tue Sep 20 10:30:54 2022 +0200 1.3 @@ -597,3 +597,17 @@ 1.4 cx_strfree(&replcs1); 1.5 cx_strfree(&replcs2); 1.6 } 1.7 + 1.8 +TEST(String, strupper) { 1.9 + cxmutstr str = cx_strdup(cx_str("thIs 1s @ Te$t")); 1.10 + cx_strupper(str); 1.11 + EXPECT_STREQ(str.ptr, "THIS 1S @ TE$T"); 1.12 + cx_strfree(&str); 1.13 +} 1.14 + 1.15 +TEST(String, strlower) { 1.16 + cxmutstr str = cx_strdup(cx_str("thIs 1s @ Te$t")); 1.17 + cx_strlower(str); 1.18 + EXPECT_STREQ(str.ptr, "this 1s @ te$t"); 1.19 + cx_strfree(&str); 1.20 +}