#217 cover cx_strcat macro

Sun, 23 Oct 2022 16:57:10 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 23 Oct 2022 16:57:10 +0200
changeset 597
8b48126671cf
parent 596
52fcaf3c9154
child 598
70b7456b5b12

#217 cover cx_strcat macro

test/test_string.cpp file | annotate | diff | comparison | revisions
--- a/test/test_string.cpp	Sun Oct 23 16:49:35 2022 +0200
+++ b/test/test_string.cpp	Sun Oct 23 16:57:10 2022 +0200
@@ -257,6 +257,12 @@
     cx_strfree_a(&alloc, &t4);
 
     EXPECT_TRUE(alloc.verify());
+
+    // use the macro
+    cxmutstr t5 = cx_strcat(3, s3, s1, s2);
+    EXPECT_EQ(cx_strcmp(cx_strcast(t5), cx_str("561234")), 0);
+    EXPECT_ZERO_TERMINATED(t5);
+    cx_strfree(&t5);
 }
 
 TEST(String, strsplit) {

mercurial