test/mpool_tests.c

changeset 19
cdd7a3173249
parent 14
b78e174b6814
child 28
1666cbeb1db8
     1.1 --- a/test/mpool_tests.c	Wed Jan 04 14:51:54 2012 +0100
     1.2 +++ b/test/mpool_tests.c	Wed Jan 11 12:19:48 2012 +0100
     1.3 @@ -25,6 +25,8 @@
     1.4  }
     1.5  
     1.6  int mpool_tests() {
     1.7 +	int r = 0;
     1.8 +
     1.9      printf("   Test ucx_mempool_new\n");
    1.10      UcxMempool *pool = ucx_mempool_new(16);
    1.11  
    1.12 @@ -55,6 +57,7 @@
    1.13      char *str = ucx_mempool_calloc(pool, 1, 3);
    1.14      if(str[0] != 0 || str[1] != 0 || str[2] != 0) {
    1.15          fprintf(stderr, "ucx_mempool_calloc failed\n");
    1.16 +        r--;
    1.17      }
    1.18      str[0] = 'O';
    1.19      str[1] = 'K';
    1.20 @@ -65,6 +68,7 @@
    1.21      str[3] = 0;
    1.22      if(strcmp(str, "OK!") != 0) {
    1.23          fprintf(stderr, "Test ucx_mempool_realloc failed!\n");
    1.24 +        r--;
    1.25      }
    1.26      
    1.27      printf("   Test ucx_mempool_reg_destr\n");
    1.28 @@ -75,5 +79,5 @@
    1.29      //ucx_mempool_free(pool);
    1.30      
    1.31  
    1.32 -    return 0;
    1.33 +    return r;
    1.34  }

mercurial