test/test_string.cpp

changeset 597
8b48126671cf
parent 589
c290f8fd979e
child 598
70b7456b5b12
equal deleted inserted replaced
596:52fcaf3c9154 597:8b48126671cf
255 EXPECT_EQ(cx_strcmp(cx_strcast(t4), cx_str("")), 0); 255 EXPECT_EQ(cx_strcmp(cx_strcast(t4), cx_str("")), 0);
256 EXPECT_ZERO_TERMINATED(t4); 256 EXPECT_ZERO_TERMINATED(t4);
257 cx_strfree_a(&alloc, &t4); 257 cx_strfree_a(&alloc, &t4);
258 258
259 EXPECT_TRUE(alloc.verify()); 259 EXPECT_TRUE(alloc.verify());
260
261 // use the macro
262 cxmutstr t5 = cx_strcat(3, s3, s1, s2);
263 EXPECT_EQ(cx_strcmp(cx_strcast(t5), cx_str("561234")), 0);
264 EXPECT_ZERO_TERMINATED(t5);
265 cx_strfree(&t5);
260 } 266 }
261 267
262 TEST(String, strsplit) { 268 TEST(String, strsplit) {
263 269
264 cxstring test = cx_str("this,is,a,csv,string"); 270 cxstring test = cx_str("this,is,a,csv,string");

mercurial