Sun, 23 Oct 2022 16:57:10 +0200
#217 cover cx_strcat macro
test/test_string.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/test/test_string.cpp Sun Oct 23 16:49:35 2022 +0200 1.2 +++ b/test/test_string.cpp Sun Oct 23 16:57:10 2022 +0200 1.3 @@ -257,6 +257,12 @@ 1.4 cx_strfree_a(&alloc, &t4); 1.5 1.6 EXPECT_TRUE(alloc.verify()); 1.7 + 1.8 + // use the macro 1.9 + cxmutstr t5 = cx_strcat(3, s3, s1, s2); 1.10 + EXPECT_EQ(cx_strcmp(cx_strcast(t5), cx_str("561234")), 0); 1.11 + EXPECT_ZERO_TERMINATED(t5); 1.12 + cx_strfree(&t5); 1.13 } 1.14 1.15 TEST(String, strsplit) {