add tests for strupper and strlower

Tue, 20 Sep 2022 10:30:54 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 20 Sep 2022 10:30:54 +0200
changeset 586
aa51aaa907b9
parent 585
038f5e99e00f
child 587
3dd55e246d2d

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);
+}

mercurial