test/buffer_tests.c

changeset 169
279dd3ca7a77
parent 168
24a012440dee
child 177
11ad03783baf
equal deleted inserted replaced
168:24a012440dee 169:279dd3ca7a77
361 free(buffer); 361 free(buffer);
362 } 362 }
363 363
364 UCX_TEST(test_ucx_buffer_write) { 364 UCX_TEST(test_ucx_buffer_write) {
365 char *buffer = (char*) malloc(32); 365 char *buffer = (char*) malloc(32);
366 memset(buffer, 0, 32);
367
366 memset(buffer, 32, 8); 368 memset(buffer, 32, 8);
367 for (int i = 8; i < 16 ; i++) { 369 for (int i = 8; i < 16 ; i++) {
368 buffer[i] = 40+i; 370 buffer[i] = 40+i;
369 } 371 }
370 372
430 free(buffer); 432 free(buffer);
431 } 433 }
432 434
433 UCX_TEST(test_ucx_buffer_write_ax) { 435 UCX_TEST(test_ucx_buffer_write_ax) {
434 char *buffer = (char*) malloc(16); 436 char *buffer = (char*) malloc(16);
437 memset(buffer, 0, 16);
435 438
436 UcxBuffer *b = ucx_buffer_new(buffer, 16, 439 UcxBuffer *b = ucx_buffer_new(buffer, 16,
437 UCX_BUFFER_AUTOEXTEND | UCX_BUFFER_AUTOFREE); 440 UCX_BUFFER_AUTOEXTEND | UCX_BUFFER_AUTOFREE);
438 int r; 441 int r;
439 442

mercurial