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