# HG changeset patch # User Mike Becker # Date 1663662654 -7200 # Node ID aa51aaa907b9baa5443a88ecdc020327c604b70f # Parent 038f5e99e00f89da64695d81496ef7fe82753c20 add tests for strupper and strlower diff -r 038f5e99e00f -r aa51aaa907b9 test/test_string.cpp --- 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); +}