test/test_allocator.c

changeset 443
d6d8712e15bc
parent 434
38ee262e8b94
equal deleted inserted replaced
442:310019ddfe4e 443:d6d8712e15bc
78 if (CUE_SUCCESS != CU_initialize_registry()) { 78 if (CUE_SUCCESS != CU_initialize_registry()) {
79 return CU_get_error(); 79 return CU_get_error();
80 } 80 }
81 81
82 suite = CU_add_suite("default allocator", NULL, NULL); 82 suite = CU_add_suite("default allocator", NULL, NULL);
83 if (NULL == suite) {
84 CU_cleanup_registry();
85 return CU_get_error();
86 }
87 83
88 if ( 84 CU_add_test(suite, "default allocator available", test_default_allocator_available);
89 !CU_add_test(suite, "default allocator available", test_default_allocator_available) || 85 CU_add_test(suite, "test of malloc()", test_default_malloc);
90 !CU_add_test(suite, "test of malloc()", test_default_malloc)|| 86 CU_add_test(suite, "test of realloc()", test_default_realloc);
91 !CU_add_test(suite, "test of realloc()", test_default_realloc) || 87 CU_add_test(suite, "test of realloc() via cxReallocate", test_default_reallocate);
92 !CU_add_test(suite, "test of realloc() via cxReallocate", test_default_reallocate) || 88 CU_add_test(suite, "test of calloc()", test_default_calloc);
93 !CU_add_test(suite, "test of calloc()", test_default_calloc) || 89 CU_add_test(suite, "test of free()", test_default_free);
94 !CU_add_test(suite, "test of free()", test_default_free)
95 ) {
96 CU_cleanup_registry();
97 return CU_get_error();
98 }
99 90
100 CU_basic_set_mode(UCX_CU_BRM); 91 CU_basic_set_mode(UCX_CU_BRM);
101 92
102 int exitcode; 93 int exitcode;
103 if (CU_basic_run_tests()) { 94 if (CU_basic_run_tests()) {

mercurial