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"); |