Sat, 01 Apr 2023 11:00:59 +0200
test coverage for cx_strcmp pointer variants
tests/test_string.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/tests/test_string.cpp Tue Mar 28 21:00:33 2023 +0200 1.2 +++ b/tests/test_string.cpp Sat Apr 01 11:00:59 2023 +0200 1.3 @@ -213,6 +213,11 @@ 1.4 EXPECT_GT(cx_strcmp(str, cx_str("compare shit")), 0); 1.5 EXPECT_LT(cx_strcmp(str, cx_str("compare this not")), 0); 1.6 EXPECT_GT(cx_strcmp(str, cx_str("compare")), 0); 1.7 + 1.8 + cxstring str2 = cx_str("Compare This"); 1.9 + EXPECT_NE(cx_strcmp_p(&str, &str2), 0); 1.10 + str2 = cx_str("compare this"); 1.11 + EXPECT_EQ(cx_strcmp_p(&str, &str2), 0); 1.12 } 1.13 1.14 TEST(String, strcasecmp) { 1.15 @@ -226,6 +231,11 @@ 1.16 EXPECT_GT(cx_strcasecmp(str, cx_str("compare shit")), 0); 1.17 EXPECT_LT(cx_strcasecmp(str, cx_str("compare this not")), 0); 1.18 EXPECT_GT(cx_strcasecmp(str, cx_str("compare")), 0); 1.19 + 1.20 + cxstring str2 = cx_str("Compare This"); 1.21 + EXPECT_EQ(cx_strcasecmp_p(&str, &str2), 0); 1.22 + str2 = cx_str("Compare Tool"); 1.23 + EXPECT_LT(cx_strcasecmp_p(&str, &str2), 0); 1.24 } 1.25 1.26 TEST(String, strcat) {