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

mercurial