# HG changeset patch # User Mike Becker # Date 1680339659 -7200 # Node ID d7a67375a7ac24cab65a46f11f58c293c43da37d # Parent 4ad8ea3aee4932ca20a887f1a36a0fb24db97b0b test coverage for cx_strcmp pointer variants diff -r 4ad8ea3aee49 -r d7a67375a7ac tests/test_string.cpp --- a/tests/test_string.cpp Tue Mar 28 21:00:33 2023 +0200 +++ b/tests/test_string.cpp Sat Apr 01 11:00:59 2023 +0200 @@ -213,6 +213,11 @@ EXPECT_GT(cx_strcmp(str, cx_str("compare shit")), 0); EXPECT_LT(cx_strcmp(str, cx_str("compare this not")), 0); EXPECT_GT(cx_strcmp(str, cx_str("compare")), 0); + + cxstring str2 = cx_str("Compare This"); + EXPECT_NE(cx_strcmp_p(&str, &str2), 0); + str2 = cx_str("compare this"); + EXPECT_EQ(cx_strcmp_p(&str, &str2), 0); } TEST(String, strcasecmp) { @@ -226,6 +231,11 @@ EXPECT_GT(cx_strcasecmp(str, cx_str("compare shit")), 0); EXPECT_LT(cx_strcasecmp(str, cx_str("compare this not")), 0); EXPECT_GT(cx_strcasecmp(str, cx_str("compare")), 0); + + cxstring str2 = cx_str("Compare This"); + EXPECT_EQ(cx_strcasecmp_p(&str, &str2), 0); + str2 = cx_str("Compare Tool"); + EXPECT_LT(cx_strcasecmp_p(&str, &str2), 0); } TEST(String, strcat) {