test/string_tests.c

changeset 179
ee25d79a4187
parent 177
11ad03783baf
child 180
2185f19dcc45
--- a/test/string_tests.c	Mon Jul 07 11:54:55 2014 +0200
+++ b/test/string_tests.c	Mon Jul 14 12:45:48 2014 +0200
@@ -40,33 +40,18 @@
     UCX_TEST_END
 }
 
-UCX_TEST(test_sstr_len_cat) {
+UCX_TEST(test_sstr_len) {
     sstr_t s1 = ST("1234");
     sstr_t s2 = ST(".:.:.");
     sstr_t s3 = ST("X");
     
     size_t len = sstrnlen(3, s1, s2, s3);
-    sstr_t cat;
-    cat.ptr = (char*) malloc(16);
-    cat.length = 16;
-    cat = sstrncat(cat, 3, s1, s2, s3);
     
     UCX_TEST_BEGIN
     
     UCX_TEST_ASSERT(len == 10, "sstrnlen returned wrong size");
-    
-    UCX_TEST_ASSERT(cat.ptr[0] == '1', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[1] == '2', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[2] == '3', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[3] == '4', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[4] == '.', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[8] == '.', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.ptr[9] == 'X', "sstrncat, wrong content");
-    UCX_TEST_ASSERT(cat.length == 10, "sstrncat, wrong length");
-    
+
     UCX_TEST_END
-    
-    free(cat.ptr);
 }
 
 UCX_TEST(test_sstrchr_sstrrchr) {

mercurial