tests/test_streams.c

changeset 1065
6eb7b54975ee
parent 971
cc204fc56c9c
equal deleted inserted replaced
1064:f3b04cd60776 1065:6eb7b54975ee
41 cxBufferSeek(&source, 0, SEEK_SET); 41 cxBufferSeek(&source, 0, SEEK_SET);
42 char tmp[4]; 42 char tmp[4];
43 43
44 CX_TEST_DO { 44 CX_TEST_DO {
45 size_t result = cx_stream_bncopy(&source, &target, 45 size_t result = cx_stream_bncopy(&source, &target,
46 (cx_read_func) cxBufferRead,
47 (cx_write_func) cxBufferWrite,
48 tmp, 4, 0);
49 CX_TEST_ASSERT(result == 0);
50 CX_TEST_ASSERT(target.size == 0);
51
52 result = cx_stream_bncopy(&source, &target,
46 (cx_read_func) cxBufferRead, 53 (cx_read_func) cxBufferRead,
47 (cx_write_func) cxBufferWrite, 54 (cx_write_func) cxBufferWrite,
48 tmp, 4, 20); 55 tmp, 4, 20);
49 CX_TEST_ASSERT(result == 20); 56 CX_TEST_ASSERT(result == 20);
50 CX_TEST_ASSERT(target.size == 20); 57 CX_TEST_ASSERT(target.size == 20);

mercurial