test/buffer_tests.c

changeset 71
303dabadff1c
parent 69
fb59270b1de3
child 76
655020a30e77
equal deleted inserted replaced
69:fb59270b1de3 71:303dabadff1c
121 UCX_TEST_ASSERT(memcmp(buffer, teststring, 16) == 0, 121 UCX_TEST_ASSERT(memcmp(buffer, teststring, 16) == 0,
122 "buffer data incorrect"); 122 "buffer data incorrect");
123 UCX_TEST_ASSERT(ucx_buffer_eof(b), "eof shall be set"); 123 UCX_TEST_ASSERT(ucx_buffer_eof(b), "eof shall be set");
124 124
125 ucx_buffer_seek(b, 8, SEEK_SET); 125 ucx_buffer_seek(b, 8, SEEK_SET);
126 r = ucx_buffer_write("not", 1, 3, b); 126 r = ucx_buffer_write((void*)"not", 1, 3, b);
127 UCX_TEST_ASSERT(r == 3, "three bytes should be replace"); 127 UCX_TEST_ASSERT(r == 3, "three bytes should be replace");
128 UCX_TEST_ASSERT(memcmp(buffer, "this is not too much", 16) == 0, 128 UCX_TEST_ASSERT(memcmp(buffer, "this is not too much", 16) == 0,
129 "modified buffer is incorrect"); 129 "modified buffer is incorrect");
130 130
131 const char* threebytestring = " t h r e e "; 131 const char* threebytestring = " t h r e e ";

mercurial