# HG changeset patch # User Olaf Wintermann # Date 1632845152 -7200 # Node ID d6d8712e15bc95d4f07394839b6358f25019790e # Parent 310019ddfe4e4a89107ba690be5c5414326012bf remove error handling from tests diff -r 310019ddfe4e -r d6d8712e15bc test/test_allocator.c --- a/test/test_allocator.c Tue Sep 28 18:03:10 2021 +0200 +++ b/test/test_allocator.c Tue Sep 28 18:05:52 2021 +0200 @@ -80,22 +80,13 @@ } suite = CU_add_suite("default allocator", NULL, NULL); - if (NULL == suite) { - CU_cleanup_registry(); - return CU_get_error(); - } - if ( - !CU_add_test(suite, "default allocator available", test_default_allocator_available) || - !CU_add_test(suite, "test of malloc()", test_default_malloc)|| - !CU_add_test(suite, "test of realloc()", test_default_realloc) || - !CU_add_test(suite, "test of realloc() via cxReallocate", test_default_reallocate) || - !CU_add_test(suite, "test of calloc()", test_default_calloc) || - !CU_add_test(suite, "test of free()", test_default_free) - ) { - CU_cleanup_registry(); - return CU_get_error(); - } + CU_add_test(suite, "default allocator available", test_default_allocator_available); + CU_add_test(suite, "test of malloc()", test_default_malloc); + CU_add_test(suite, "test of realloc()", test_default_realloc); + CU_add_test(suite, "test of realloc() via cxReallocate", test_default_reallocate); + CU_add_test(suite, "test of calloc()", test_default_calloc); + CU_add_test(suite, "test of free()", test_default_free); CU_basic_set_mode(UCX_CU_BRM); diff -r 310019ddfe4e -r d6d8712e15bc test/test_list.c --- a/test/test_list.c Tue Sep 28 18:03:10 2021 +0200 +++ b/test/test_list.c Tue Sep 28 18:05:52 2021 +0200 @@ -173,34 +173,10 @@ } suite = CU_add_suite("linked list suite", NULL, NULL); - if (NULL == suite) { - CU_cleanup_registry(); - return CU_get_error(); - } - - if ( - !CU_add_test(suite, "linked list: create and destroy", test_linked_list_create) || - !CU_add_test(suite, "linked list: get node at index", test_linked_list_at) || - !CU_add_test(suite, "linked list: add", test_cx_linked_list_add) - ) { - CU_cleanup_registry(); - return CU_get_error(); - } - - suite = CU_add_suite("array suite", NULL, NULL); - if (NULL == suite) { - CU_cleanup_registry(); - return CU_get_error(); - } - - /* - if ( - !CU_add_test(suite, "array...", test_array...) - ) { - CU_cleanup_registry(); - return CU_get_error(); - } - */ + + CU_add_test(suite, "linked list: create and destroy", test_linked_list_create); + CU_add_test(suite, "linked list: get node at index", test_linked_list_at); + CU_add_test(suite, "linked list: add", test_cx_linked_list_add); CU_basic_set_mode(UCX_CU_BRM); diff -r 310019ddfe4e -r d6d8712e15bc test/test_tree.c --- a/test/test_tree.c Tue Sep 28 18:03:10 2021 +0200 +++ b/test/test_tree.c Tue Sep 28 18:05:52 2021 +0200 @@ -167,23 +167,9 @@ } suite = CU_add_suite("tree suite", NULL, NULL); - if (NULL == suite) { - CU_cleanup_registry(); - return CU_get_error(); - } - if ( - !CU_add_test(suite, "ll add tree node", test_cx_tree_add_node) - ) { - CU_cleanup_registry(); - return CU_get_error(); - } - if ( - !CU_add_test(suite, "ll add tree child node", test_cx_tree_add_child_node) - ) { - CU_cleanup_registry(); - return CU_get_error(); - } + CU_add_test(suite, "ll add tree node", test_cx_tree_add_node); + CU_add_test(suite, "ll add tree child node", test_cx_tree_add_child_node); CU_basic_set_mode(UCX_CU_BRM);