test/utils_tests.c

changeset 222
e0f850709a5c
parent 192
1e51558b9d09
child 223
e18884bbad48
     1.1 --- a/test/utils_tests.c	Wed Sep 07 11:32:22 2016 +0200
     1.2 +++ b/test/utils_tests.c	Wed Sep 07 12:26:01 2016 +0200
     1.3 @@ -102,7 +102,9 @@
     1.4      UCX_TEST_ASSERT(b1->size == 16, "failed to fill buffer b1");
     1.5      ucx_buffer_seek(b1, 0, SEEK_SET);
     1.6      
     1.7 -    size_t ncp = ucx_stream_hcopy(b1, b2, ucx_buffer_read, ucx_buffer_write);
     1.8 +    char copybuf[256];
     1.9 +    size_t ncp = ucx_stream_bcopy(b1, b2, ucx_buffer_read, ucx_buffer_write,
    1.10 +            copybuf, sizeof(copybuf));
    1.11      UCX_TEST_ASSERT(ncp == 16, "wrong number of copied bytes");
    1.12      UCX_TEST_ASSERT(b2->size == 16, "b2 has wrong size");
    1.13      UCX_TEST_ASSERT(memcmp(b1->space, b2->space, 16) == 0,
    1.14 @@ -116,12 +118,12 @@
    1.15      FILE *file = tmpfile();
    1.16      UCX_TEST_ASSERT(file, "test file cannot be opened, test aborted");
    1.17      
    1.18 -    ncp = ucx_stream_hcopy(b1, file, ucx_buffer_read, fwrite);
    1.19 +    ncp = ucx_stream_copy(b1, file, ucx_buffer_read, fwrite);
    1.20      UCX_TEST_ASSERT(ncp == 16, "copied wrong number of bytes to file");
    1.21      
    1.22      fseek(file, 0, SEEK_SET);
    1.23      
    1.24 -    ncp = ucx_stream_hcopy(file, b2, fread, ucx_buffer_write);
    1.25 +    ncp = ucx_stream_copy(file, b2, fread, ucx_buffer_write);
    1.26      UCX_TEST_ASSERT(ncp == 16, "copied wrong number of bytes from file");
    1.27      
    1.28      UCX_TEST_ASSERT(memcmp(b1->space, b2->space, 16) == 0,

mercurial