diff options
Diffstat (limited to 'test')
58 files changed, 1498 insertions, 1508 deletions
diff --git a/test/API/tattr.c b/test/API/tattr.c index 4e905b0..476e32b 100644 --- a/test/API/tattr.c +++ b/test/API/tattr.c @@ -4717,7 +4717,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -4801,7 +4801,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -4924,7 +4924,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -5036,7 +5036,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -5269,7 +5269,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -5324,7 +5324,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create several attributes, but keep storage in compact form */ @@ -5488,7 +5488,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -5707,7 +5707,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -6046,7 +6046,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -6575,7 +6575,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -6647,7 +6647,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete attributes from compact storage */ @@ -6707,7 +6707,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -6780,7 +6780,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete attributes from dense storage */ @@ -6850,7 +6850,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create attributes, to push into dense form */ @@ -6897,7 +6897,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete every other attribute from dense storage, in appropriate order */ @@ -6950,7 +6950,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete remaining attributes from dense storage, in appropriate order */ @@ -7252,7 +7252,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7283,7 +7283,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7314,7 +7314,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7347,7 +7347,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7589,7 +7589,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -7694,7 +7694,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -7996,7 +7996,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -8074,7 +8074,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -8338,7 +8338,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -8444,7 +8444,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -8635,7 +8635,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ #if 0 /* Check on dataset's attribute storage status */ @@ -8698,7 +8698,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ diff --git a/test/API/testhdf5.c b/test/API/testhdf5.c index d015933..58cbfdf 100644 --- a/test/API/testhdf5.c +++ b/test/API/testhdf5.c @@ -117,7 +117,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) int len; static char *env = NULL; - HDassert(name); + assert(name); MPI_Initialized(&mpi_initialized); MPI_Finalized(&mpi_finalized); @@ -125,7 +125,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) if (mpi_initialized && !mpi_finalized) { MPI_Comm_rank(comm, &mpi_rank); MPI_Comm_size(comm, &mpi_size); - HDassert(root < mpi_size); + assert(root < mpi_size); /* The root task does the getenv call * and sends the result to the other tasks */ @@ -515,7 +515,7 @@ h5_using_default_driver(const char *drv_name) { hbool_t ret_val = TRUE; - HDassert(H5_DEFAULT_VFD == H5FD_SEC2); + assert(H5_DEFAULT_VFD == H5FD_SEC2); if (!drv_name) drv_name = HDgetenv(HDF5_DRIVER); @@ -533,8 +533,8 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib hid_t driver_id = H5I_INVALID_HID; herr_t ret_value = SUCCEED; - HDassert(fapl_id >= 0); - HDassert(default_vfd_compatible); + assert(fapl_id >= 0); + assert(default_vfd_compatible); if (fapl_id == H5P_DEFAULT) fapl_id = H5P_FILE_ACCESS_DEFAULT; diff --git a/test/API/tfile.c b/test/API/tfile.c index c0b2921..12c57e6 100644 --- a/test/API/tfile.c +++ b/test/API/tfile.c @@ -4486,7 +4486,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split) hbool_t relax; H5FD_mem_t mt; - HDassert(split); + assert(split); HDmemset(memb_name, 0, sizeof memb_name); diff --git a/test/API/th5s.c b/test/API/th5s.c index f09cfeb..d27e57c 100644 --- a/test/API/th5s.c +++ b/test/API/th5s.c @@ -1790,7 +1790,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1815,7 +1815,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = (uint8_t)(expected_version == 3 ? 4 : 8); break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1840,7 +1840,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } @@ -1865,7 +1865,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1890,7 +1890,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } @@ -1984,7 +1984,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } @@ -2013,7 +2013,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } @@ -2026,7 +2026,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab"); /* Verify the version and encoded size expected for the configuration */ - HDassert(expected_enc_size <= 255); + assert(expected_enc_size <= 255); ret = test_h5s_check_encoding(fapl, sid, expected_version, (uint8_t)expected_enc_size, expected_to_fail); CHECK(ret, FAIL, "test_h5s_check_encoding"); diff --git a/test/API/tselect.c b/test/API/tselect.c index 292bf84..619df42 100644 --- a/test/API/tselect.c +++ b/test/API/tselect.c @@ -1886,8 +1886,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si size_t s; /* Local index variable */ hbool_t mis_match; /* Flag to indicate mismatch in expected value */ - HDassert(cube_buf); - HDassert(cube_size > 0); + assert(cube_buf); + assert(cube_size > 0); expected_value = 0; mis_match = FALSE; @@ -1904,7 +1904,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t cube_si m = 0; do { /* Sanity check */ - HDassert(s < cube_size); + assert(s < cube_size); /* Check for correct value */ if (*cube_ptr != expected_value) @@ -1980,12 +1980,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co MESSAGE(7, ("\tranks = %u/%u, edge_size = %u, chunk_edge_size = %u.\n", small_rank, large_rank, edge_size, chunk_edge_size)); - HDassert(edge_size >= 6); - HDassert(edge_size >= chunk_edge_size); - HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); - HDassert(small_rank > 0); - HDassert(small_rank < large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(edge_size >= chunk_edge_size); + assert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); + assert(small_rank > 0); + assert(small_rank < large_rank); + assert(large_rank <= SS_DR_MAX_RANK); /* Compute cube sizes */ small_cube_size = large_cube_size = (size_t)1; @@ -1996,7 +1996,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co large_cube_size *= (size_t)edge_size; } /* end for */ - HDassert(large_cube_size < (size_t)UINT_MAX); + assert(large_cube_size < (size_t)UINT_MAX); /* set up the start, stride, count, and block pointers */ start_ptr = &(start[SS_DR_MAX_RANK - large_rank]); @@ -2242,8 +2242,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); mis_match = FALSE; ptr_1 = large_cube_buf_1; @@ -2436,8 +2436,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); mis_match = FALSE; ptr_1 = large_cube_buf_1; @@ -2603,16 +2603,16 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u unsigned u; /* Local index variables */ herr_t ret; /* Generic return value */ - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(0 < sel_rank); - HDassert(sel_rank <= tgt_n_cube_rank); - HDassert(tgt_n_cube_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(0 < sel_rank); + assert(sel_rank <= tgt_n_cube_rank); + assert(tgt_n_cube_rank <= SS_DR_MAX_RANK); sel_offset = SS_DR_MAX_RANK - sel_rank; n_cube_offset = SS_DR_MAX_RANK - tgt_n_cube_rank; - HDassert(n_cube_offset <= sel_offset); + assert(n_cube_offset <= sel_offset); /* First, compute the base count (which assumes start == 0 * for the associated offset) and offset_count (which @@ -2827,13 +2827,13 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank unsigned v, w, x, y, z; /* to track position in checker */ const unsigned test_max_rank = 5; /* code changes needed if this is increased */ - HDassert(buf_ptr != NULL); - HDassert(0 < rank); - HDassert(rank <= test_max_rank); - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(test_max_rank <= SS_DR_MAX_RANK); + assert(buf_ptr != NULL); + assert(0 < rank); + assert(rank <= test_max_rank); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(test_max_rank <= SS_DR_MAX_RANK); val_ptr = buf_ptr; expected_value = first_expected_val; @@ -2966,15 +2966,15 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ MESSAGE(7, ("\tranks = %d/%d, edge_size = %d, checker_edge_size = %d, chunk_edge_size = %d.\n", small_rank, large_rank, edge_size, checker_edge_size, chunk_edge_size)); - HDassert(edge_size >= 6); - HDassert(checker_edge_size > 0); - HDassert(checker_edge_size <= edge_size); - HDassert(edge_size >= chunk_edge_size); - HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); - HDassert(small_rank > 0); - HDassert(small_rank < large_rank); - HDassert(large_rank <= test_max_rank); - HDassert(test_max_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(checker_edge_size > 0); + assert(checker_edge_size <= edge_size); + assert(edge_size >= chunk_edge_size); + assert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); + assert(small_rank > 0); + assert(small_rank < large_rank); + assert(large_rank <= test_max_rank); + assert(test_max_rank <= SS_DR_MAX_RANK); /* Compute cube sizes */ small_cube_size = large_cube_size = (size_t)1; @@ -2984,16 +2984,16 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ large_cube_size *= (size_t)edge_size; } /* end for */ - HDassert(large_cube_size < (size_t)(UINT_MAX)); + assert(large_cube_size < (size_t)(UINT_MAX)); small_rank_offset = test_max_rank - small_rank; - HDassert(small_rank_offset >= 1); + assert(small_rank_offset >= 1); /* also, at present, we use 16 bit values in this test -- * hence the following assertion. Delete it if we convert * to 32 bit values. */ - HDassert(large_cube_size < (size_t)(64 * 1024)); + assert(large_cube_size < (size_t)(64 * 1024)); /* Allocate & initialize buffers */ small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size); @@ -3160,11 +3160,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3240,11 +3240,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3274,8 +3274,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); /* verify that the large cube contains only zeros before the slice */ for (s = 0; s < start_index; s++) { @@ -3283,7 +3283,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ data_ok = FALSE; ptr_1++; } /* end for */ - HDassert(s == start_index); + assert(s == start_index); data_ok &= test_select_hyper_checker_board_dr__verify_data( ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE); @@ -3291,7 +3291,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ ptr_1 += small_cube_size; s += small_cube_size; - HDassert(s == stop_index + 1); + assert(s == stop_index + 1); /* verify that the large cube contains only zeros after the slice */ for (s = stop_index + 1; s < large_cube_size; s++) { @@ -3360,11 +3360,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3455,11 +3455,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3498,8 +3498,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); /* verify that the large cube contains only zeros before the slice */ for (s = 0; s < start_index; s++) { @@ -3507,7 +3507,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ data_ok = FALSE; ptr_1++; } /* end for */ - HDassert(s == start_index); + assert(s == start_index); /* verify that the slice contains the expected data */ data_ok &= test_select_hyper_checker_board_dr__verify_data( @@ -3516,7 +3516,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ ptr_1 += small_cube_size; s += small_cube_size; - HDassert(s == stop_index + 1); + assert(s == stop_index + 1); /* verify that the large cube contains only zeros after the slice */ for (s = stop_index + 1; s < large_cube_size; s++) { @@ -5569,7 +5569,7 @@ test_select_hyper_valid_combination(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Selection Combination Validity\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for single point selection */ single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL); @@ -8459,7 +8459,7 @@ test_shape_same(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Same Shape Comparisons\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for "all" selection */ all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL); @@ -10912,13 +10912,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_ htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(0 <= offset); - HDassert(offset < large_rank); - HDassert(edge_size > 0); - HDassert(edge_size <= 1000); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(0 <= offset); + assert(offset < large_rank); + assert(edge_size > 0); + assert(edge_size <= 1000); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -10970,7 +10970,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_ */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -11164,21 +11164,21 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(0 < checker_size); - HDassert(checker_size <= edge_size); - HDassert(edge_size <= 1000); - HDassert(0 <= offset); - HDassert(offset < (int)edge_size); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(0 < checker_size); + assert(checker_size <= edge_size); + assert(edge_size <= 1000); + assert(0 <= offset); + assert(offset < (int)edge_size); for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++) if (dim_selected[i] == TRUE) dims_selected++; - HDassert(dims_selected >= 0); - HDassert(dims_selected <= large_rank); + assert(dims_selected >= 0); + assert(dims_selected <= large_rank); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -11367,7 +11367,7 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -11708,22 +11708,22 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(9 <= edge_size); - HDassert(edge_size <= 1000); - HDassert(0 <= slice_offset); - HDassert(slice_offset < edge_size); - HDassert(-2 <= pattern_offset); - HDassert(pattern_offset <= 2); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(9 <= edge_size); + assert(edge_size <= 1000); + assert(0 <= slice_offset); + assert(slice_offset < edge_size); + assert(-2 <= pattern_offset); + assert(pattern_offset <= 2); for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++) if (dim_selected[i] == TRUE) dims_selected++; - HDassert(dims_selected >= 0); - HDassert(dims_selected <= large_rank); + assert(dims_selected >= 0); + assert(dims_selected <= large_rank); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -11821,7 +11821,7 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -14327,7 +14327,7 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en hsize_t blocklist[12]; herr_t ret; - HDassert(enblocks <= 2); + assert(enblocks <= 2); /* Copy sid to lim_sid */ lim_sid = H5Scopy(sid); @@ -14365,7 +14365,7 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en ERROR("H5Sget_select_hyper_blocklist"); } /* end if */ else { - HDassert(nblocks == (hssize_t)2); + assert(nblocks == (hssize_t)2); if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) { if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0) ERROR("H5Sget_select_hyper_blocklist"); @@ -14795,7 +14795,7 @@ test_internal_consistency(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Consistency of Internal States\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for "all" selection */ all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL); @@ -15362,7 +15362,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15410,7 +15410,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15481,7 +15481,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15529,7 +15529,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15567,7 +15567,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ diff --git a/test/API/tunicode.c b/test/API/tunicode.c index fa59456..04d0d8b 100644 --- a/test/API/tunicode.c +++ b/test/API/tunicode.c @@ -152,7 +152,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string) /* Create a src_type that holds the UTF-8 string and its final NULL */ big_len = length + 1; /* +1 byte for final NULL */ - HDassert((2 * big_len) <= sizeof(cmpbuf)); + assert((2 * big_len) <= sizeof(cmpbuf)); src_type = mkstr(big_len, H5T_STR_NULLTERM); CHECK(src_type, FAIL, "mkstr"); /* Create a dst_type that holds half of the UTF-8 string and a final @@ -215,7 +215,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string) /* Create a src_type that holds the UTF-8 string */ big_len = length; - HDassert((2 * big_len) <= sizeof(cmpbuf)); + assert((2 * big_len) <= sizeof(cmpbuf)); src_type = mkstr(big_len, H5T_STR_NULLPAD); CHECK(src_type, FAIL, "mkstr"); /* Create a dst_type that holds half of the UTF-8 string */ diff --git a/test/API/tvltypes.c b/test/API/tvltypes.c index eca534b..a17589b 100644 --- a/test/API/tvltypes.c +++ b/test/API/tvltypes.c @@ -2693,13 +2693,13 @@ test_vltypes_fill_value(void) } break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2801,13 +2801,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2988,13 +2988,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ diff --git a/test/accum.c b/test/accum.c index 80a8353..ebd7a90 100644 --- a/test/accum.c +++ b/test/accum.c @@ -193,9 +193,9 @@ test_write_read(H5F_t *f) /* Allocate buffers */ write_buf = (int *)HDmalloc(1024 * sizeof(int)); - HDassert(write_buf); + assert(write_buf); read_buf = (int *)HDcalloc((size_t)1024, sizeof(int)); - HDassert(read_buf); + assert(read_buf); /* Fill buffer with data, zero out read buffer */ for (i = 0; i < 1024; i++) @@ -252,9 +252,9 @@ test_write_read_nonacc_front(H5F_t *f) /* Allocate buffers */ write_buf = (int *)HDmalloc(2048 * sizeof(int)); - HDassert(write_buf); + assert(write_buf); read_buf = (int *)HDcalloc((size_t)2048, sizeof(int)); - HDassert(read_buf); + assert(read_buf); /* Fill buffer with data, zero out read buffer */ for (i = 0; i < 2048; i++) @@ -317,9 +317,9 @@ test_write_read_nonacc_end(H5F_t *f) /* Allocate buffers */ write_buf = (int *)HDmalloc(2048 * sizeof(int)); - HDassert(write_buf); + assert(write_buf); read_buf = (int *)HDcalloc((size_t)2048, sizeof(int)); - HDassert(read_buf); + assert(read_buf); /* Fill buffer with data, zero out read buffer */ for (i = 0; i < 2048; i++) @@ -384,11 +384,11 @@ test_free(H5F_t *f) /* Write and free the whole accumulator. */ wbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDmalloc(256 * sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); expect = (int32_t *)HDmalloc(256 * sizeof(int32_t)); - HDassert(expect); + assert(expect); /* Fill buffer with data */ for (i = 0; i < 256; i++) @@ -615,9 +615,9 @@ test_accum_overlap(H5F_t *f) /* Allocate buffers */ wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Case 1: No metadata in accumulator */ /* Write 10 1's at address 40 */ @@ -822,9 +822,9 @@ test_accum_overlap_clean(H5F_t *f) /* Allocate buffers */ wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Case 1: No metadata in accumulator */ /* Write 10 1's at address 40 */ @@ -1041,9 +1041,9 @@ test_accum_non_overlap_size(H5F_t *f) /* Allocate buffers */ wbuf = (int *)HDmalloc(4096 * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int *)HDcalloc((size_t)4096, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Case 1: No metadata in accumulator */ /* Write 10 1's at address 140 */ @@ -1115,9 +1115,9 @@ test_accum_overlap_size(H5F_t *f) /* Allocate buffers */ wbuf = (int32_t *)HDmalloc(4096 * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDcalloc((size_t)4096, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Case 1: No metadata in accumulator */ /* Write 10 1's at address 64 */ @@ -1200,9 +1200,9 @@ test_accum_adjust(H5F_t *f) /* Allocate buffers */ wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Fill up write buffer */ for (i = 0; i < s; i++) @@ -1498,9 +1498,9 @@ test_read_after(H5F_t *f) /* Allocate buffers */ wbuf = (int32_t *)HDmalloc((size_t)s * sizeof(int32_t)); - HDassert(wbuf); + assert(wbuf); rbuf = (int32_t *)HDcalloc((size_t)s, sizeof(int32_t)); - HDassert(rbuf); + assert(rbuf); /* Fill up write buffer with 1s */ for (i = 0; i < s; i++) @@ -1580,13 +1580,13 @@ test_big(H5F_t *f) /* Allocate space for the write & read buffers */ wbuf = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE); - HDassert(wbuf); + assert(wbuf); wbuf2 = (uint8_t *)HDmalloc((size_t)BIG_BUF_SIZE); - HDassert(wbuf2); + assert(wbuf2); rbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1); - HDassert(rbuf); + assert(rbuf); zbuf = (uint8_t *)HDcalloc((size_t)(BIG_BUF_SIZE + 1536), (size_t)1); - HDassert(zbuf); + assert(zbuf); /* Initialize write buffers */ for (u = 0; u < BIG_BUF_SIZE; u++) { @@ -1951,9 +1951,9 @@ test_random_write(H5F_t *f) /* Allocate space for the write & read buffers */ wbuf = (uint8_t *)HDmalloc((size_t)RANDOM_BUF_SIZE); - HDassert(wbuf); + assert(wbuf); rbuf = (uint8_t *)HDcalloc((size_t)RANDOM_BUF_SIZE, (size_t)1); - HDassert(rbuf); + assert(rbuf); /* Initialize write buffer */ for (u = 0; u < RANDOM_BUF_SIZE; u++) @@ -1971,9 +1971,9 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed); /* Allocate space for the segment length buffer */ off = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t)); - HDassert(off); + assert(off); len = (size_t *)HDmalloc(MAX_RANDOM_SEGMENTS * sizeof(size_t)); - HDassert(len); + assert(len); /* Randomly choose lengths of segments */ cur_off = 0; @@ -270,7 +270,7 @@ enough_room(hid_t fapl) fd[i] = -1; /* Get file name template */ - HDassert(H5FD_FAMILY == H5Pget_driver(fapl)); + assert(H5FD_FAMILY == H5Pget_driver(fapl)); h5_fixname(FILENAME[0], fapl, filename, sizeof(filename)); /* Create files */ diff --git a/test/btree2.c b/test/btree2.c index 2a38675..aebdebe 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -476,8 +476,8 @@ index_rec_cb(const void *_record, void *_op_data) const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record; H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data; - HDassert(record); - HDassert(search); + assert(record); + assert(search); search->key = record->key; search->val = record->val; @@ -554,7 +554,7 @@ modify_rec_cb(void *_record, void *_op_data, hbool_t *changed) H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record; H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data; - HDassert(record->key == modify->key); + assert(record->key == modify->key); record->val = modify->val; *changed = TRUE; diff --git a/test/cache.c b/test/cache.c index 80052a4..b1eb744 100644 --- a/test/cache.c +++ b/test/cache.c @@ -4780,8 +4780,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 2; size_t expected_index_size = 2 * PICO_ENTRY_SIZE; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -4874,8 +4874,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = 0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -4965,8 +4965,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5031,8 +5031,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = 0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5104,8 +5104,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5201,8 +5201,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 2; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5294,8 +5294,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5385,8 +5385,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 1; size_t expected_index_size = VARIABLE_ENTRY_SIZE / 4; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5478,8 +5478,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 3; size_t expected_index_size = 3 * PICO_ENTRY_SIZE; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5560,8 +5560,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = (size_t)0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5640,8 +5640,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5721,8 +5721,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = (size_t)0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5801,8 +5801,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -5905,8 +5905,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) size_t expected_index_size = VARIABLE_ENTRY_SIZE + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2); - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6020,8 +6020,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (VARIABLE_ENTRY_SIZE / 4) + (VARIABLE_ENTRY_SIZE / 2) + (2 * PICO_ENTRY_SIZE); - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6208,8 +6208,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) size_t expected_index_size = (2 * VARIABLE_ENTRY_SIZE) + (2 * (VARIABLE_ENTRY_SIZE / 4)) + (2 * (VARIABLE_ENTRY_SIZE / 2)) + (4 * PICO_ENTRY_SIZE); - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6451,8 +6451,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = 0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6690,8 +6690,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 3; size_t expected_index_size = 3 * PICO_ENTRY_SIZE; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6809,8 +6809,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = (size_t)0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -6998,8 +6998,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 13; size_t expected_index_size = 9 * VARIABLE_ENTRY_SIZE; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -7406,8 +7406,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = (size_t)0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -7739,8 +7739,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 5; size_t expected_index_size = 4 * VARIABLE_ENTRY_SIZE; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -7915,8 +7915,8 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) unsigned expected_index_len = 0; size_t expected_index_size = 0; - HDassert(spec_size <= max_num_spec); - HDassert(check_size <= max_num_check); + assert(spec_size <= max_num_spec); + assert(check_size <= max_num_check); spec[0] = (struct fo_flush_cache_test_spec){ /* entry_num = */ 0, @@ -8475,7 +8475,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr) expected[i].is_corked = FALSE; } - HDassert(i == num_total_entries); + assert(i == num_total_entries); pass = TRUE; } @@ -15276,7 +15276,7 @@ check_protect_retries(unsigned paged) } else { - HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); + assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); entry_ptr->cache_ptr = cache_ptr; entry_ptr->file_ptr = file_ptr; @@ -15285,7 +15285,7 @@ check_protect_retries(unsigned paged) entry_ptr->ro_ref_count++; } - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); } if (pass) @@ -33016,7 +33016,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr) entry_ptr = &(base_addr[0]); entry_addr = entry_ptr->header.addr; - HDassert(entry_addr == entry_ptr->addr); + assert(entry_addr == entry_ptr->addr); expected_hash_bucket = H5C__HASH_FCN(entry_addr); @@ -33683,7 +33683,7 @@ check_stats__smoke_check_1(H5F_t *file_ptr) static herr_t check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_ptr) { - HDassert(write_permitted_ptr); + assert(write_permitted_ptr); *write_permitted_ptr = write_permitted; @@ -33832,7 +33832,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", __func__, mile_stone++, (int)pass); if (pass) { - HDassert(fid >= 0); + assert(fid >= 0); saved_fid = fid; if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { pass = FALSE; @@ -33886,7 +33886,7 @@ setup_cache(size_t max_cache_size, size_t min_clean_size, unsigned paged) * instance, and then close the file normally. */ - HDassert(saved_cache == NULL); + assert(saved_cache == NULL); saved_cache = file_ptr->shared->cache; file_ptr->shared->cache = NULL; @@ -34018,7 +34018,7 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats) if (NULL == file_ptr) { file_ptr = (H5F_t *)H5VL_object_verify(saved_fid, H5I_FILE); - HDassert(file_ptr); + assert(file_ptr); } H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, saved_actual_base_addr, diff --git a/test/cache_common.c b/test/cache_common.c index 82ef9e4..e4135b0 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -389,8 +389,8 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr) int32_t type; int32_t idx; - HDassert(type_ptr); - HDassert(index_ptr); + assert(type_ptr); + assert(index_ptr); /* we only have a small number of entry types, so just do a * linear search. If NUMBER_OF_ENTRY_TYPES grows, we may want @@ -412,24 +412,24 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr) type = i - 1; - HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); if (addr >= PICO_ALT_BASE_ADDR) { idx = (int32_t)((addr - alt_base_addrs[type]) / entry_sizes[type]); - HDassert((idx >= 0) && (idx <= max_indices[type])); - HDassert(!((entries[type])[idx].at_main_addr)); - HDassert(addr == (entries[type])[idx].alt_addr); + assert((idx >= 0) && (idx <= max_indices[type])); + assert(!((entries[type])[idx].at_main_addr)); + assert(addr == (entries[type])[idx].alt_addr); } else { idx = (int32_t)((addr - base_addrs[type]) / entry_sizes[type]); - HDassert((idx >= 0) && (idx <= max_indices[type])); - HDassert((entries[type])[idx].at_main_addr); - HDassert(addr == (entries[type])[idx].main_addr); + assert((idx >= 0) && (idx <= max_indices[type])); + assert((entries[type])[idx].at_main_addr); + assert(addr == (entries[type])[idx].main_addr); } - HDassert(addr == (entries[type])[idx].addr); + assert(addr == (entries[type])[idx].addr); *type_ptr = type; *index_ptr = idx; @@ -465,15 +465,15 @@ get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_NDEBUG_ base_addr = entries[type]; entry = &(base_addr[idx]); - HDassert(entry->type >= 0); - HDassert(entry->type == type); - HDassert(entry->type == entry_type); - HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); - HDassert(entry->index == idx); - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[type]); - HDassert(entry == entry->self); - HDassert(entry->addr == addr); + assert(entry->type >= 0); + assert(entry->type == type); + assert(entry->type == entry_type); + assert(entry->type < NUMBER_OF_ENTRY_TYPES); + assert(entry->index == idx); + assert(entry->index >= 0); + assert(entry->index <= max_indices[type]); + assert(entry == entry->self); + assert(entry->addr == addr); *image_length = entry->size; @@ -574,16 +574,16 @@ get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED imag base_addr = entries[type]; entry = &(base_addr[idx]); - HDassert(entry->type >= 0); - HDassert(entry->type == type); - HDassert(entry->type == entry_type); - HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); - HDassert(entry->index == idx); - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[type]); - HDassert(entry == entry->self); - HDassert(entry->addr == addr); - HDassert(type == VARIABLE_ENTRY_TYPE); + assert(entry->type >= 0); + assert(entry->type == type); + assert(entry->type == entry_type); + assert(entry->type < NUMBER_OF_ENTRY_TYPES); + assert(entry->index == idx); + assert(entry->index >= 0); + assert(entry->index <= max_indices[type]); + assert(entry == entry->self); + assert(entry->addr == addr); + assert(type == VARIABLE_ENTRY_TYPE); /* Simulate SPECULATIVE read with a specified actual_len */ if (entry->actual_len) { @@ -633,16 +633,16 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void base_addr = entries[type]; entry = &(base_addr[idx]); - HDassert(entry->type >= 0); - HDassert(entry->type == type); - HDassert(entry->type == entry_type); - HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); - HDassert(type == VARIABLE_ENTRY_TYPE); - HDassert(entry->index == idx); - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[type]); - HDassert(entry == entry->self); - HDassert(entry->addr == addr); + assert(entry->type >= 0); + assert(entry->type == type); + assert(entry->type == entry_type); + assert(entry->type < NUMBER_OF_ENTRY_TYPES); + assert(type == VARIABLE_ENTRY_TYPE); + assert(entry->index == idx); + assert(entry->index >= 0); + assert(entry->index <= max_indices[type]); + assert(entry == entry->self); + assert(entry->addr == addr); if (++entry->verify_ct >= entry->max_verify_ct) return (TRUE); @@ -686,26 +686,26 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb base_addr = entries[type]; entry = &(base_addr[idx]); - HDassert(entry->type >= 0); - HDassert(entry->type == type); - HDassert(entry->type == entry_type); - HDassert(entry->type < NUMBER_OF_ENTRY_TYPES); - HDassert(entry->index == idx); - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[type]); - HDassert(entry == entry->self); - HDassert(entry->addr == addr); - HDassert(entry->size == len); - HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type])); - HDassert(dirty != NULL); - HDassert(entry->flush_dep_npar == 0); - HDassert(entry->flush_dep_nchd == 0); + assert(entry->type >= 0); + assert(entry->type == type); + assert(entry->type == entry_type); + assert(entry->type < NUMBER_OF_ENTRY_TYPES); + assert(entry->index == idx); + assert(entry->index >= 0); + assert(entry->index <= max_indices[type]); + assert(entry == entry->self); + assert(entry->addr == addr); + assert(entry->size == len); + assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[type])); + assert(dirty != NULL); + assert(entry->flush_dep_npar == 0); + assert(entry->flush_dep_nchd == 0); /* for now *dirty will always be FALSE */ *dirty = FALSE; /* verify that the image contains the expected data. */ - HDassert(image != NULL); + assert(image != NULL); if ((entry->at_main_addr && entry->written_to_main_addr) || (!entry->at_main_addr && entry->written_to_alt_addr)) { if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) { @@ -714,7 +714,7 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb HDfprintf(stdout, "*image = 0x%x\n", (int)(*((const char *)image))); HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF)); } /* end if */ - HDassert((*((const char *)image)) == (char)(idx & 0xFF)); + assert((*((const char *)image)) == (char)(idx & 0xFF)); } /* end if */ else { if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) { @@ -725,9 +725,9 @@ deserialize(const void *image, size_t H5_ATTR_NDEBUG_UNUSED len, void *udata, hb HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF, (((uint32_t)idx & 0xFF00) >> 8)); } /* end if */ - HDassert((*((const char *)image)) == (char)(type & 0xFF)); - HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8)); - HDassert((*(((const char *)image) + 2)) == (char)(idx & 0xFF)); + assert((*((const char *)image)) == (char)(type & 0xFF)); + assert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8)); + assert((*(((const char *)image) + 2)) == (char)(idx & 0xFF)); } /* end else */ } /* end if */ @@ -826,26 +826,26 @@ image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_NDEBUG_UNUSED const test_entry_t *entry; int32_t type; - HDassert(thing); - HDassert(image_length); + assert(thing); + assert(image_length); entry = (const test_entry_t *)thing; - HDassert(entry->self == entry); + assert(entry->self == entry); type = entry->type; - HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert(type == entry_type); - HDassert((entry->index >= 0) && (entry->index <= max_indices[type])); + assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + assert(type == entry_type); + assert((entry->index >= 0) && (entry->index <= max_indices[type])); - HDassert(entry == &(entries[type][entry->index])); + assert(entry == &(entries[type][entry->index])); if (type != VARIABLE_ENTRY_TYPE) - HDassert(entry->size == entry_sizes[type]); + assert(entry->size == entry_sizes[type]); else { - HDassert(entry->size <= entry_sizes[type]); - HDassert(entry->size > 0); + assert(entry->size <= entry_sizes[type]); + assert(entry->size > 0); } /* end else */ *image_length = entry->size; @@ -945,32 +945,32 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU test_entry_t *entry; int32_t i; - HDassert(f); - HDassert(thing); - HDassert(flags_ptr); + assert(f); + assert(thing); + assert(flags_ptr); *flags_ptr = H5C__SERIALIZE_NO_FLAGS_SET; - HDassert(new_addr_ptr); - HDassert(new_len_ptr); + assert(new_addr_ptr); + assert(new_len_ptr); entry = (test_entry_t *)thing; - HDassert(entry->self == entry); - HDassert(entry->addr == addr); - HDassert(entry->size == len); + assert(entry->self == entry); + assert(entry->addr == addr); + assert(entry->size == len); /* shouldn't serialize the entry unless it is dirty */ - HDassert(entry->is_dirty); - HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); - HDassert((entry->index >= 0) && (entry->index <= max_indices[entry->type])); - HDassert(entry == &(entries[entry->type][entry->index])); - HDassert(entry->num_flush_ops >= 0); - HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); + assert(entry->is_dirty); + assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); + assert((entry->index >= 0) && (entry->index <= max_indices[entry->type])); + assert(entry == &(entries[entry->type][entry->index])); + assert(entry->num_flush_ops >= 0); + assert(entry->num_flush_ops < MAX_FLUSH_OPS); if (entry->num_flush_ops > 0) { for (i = 0; i < entry->num_flush_ops; i++) { - HDassert(entry->file_ptr); + assert(entry->file_ptr); execute_flush_op(entry->file_ptr, entry, &((entry->flush_ops)[i]), flags_ptr); } /* end for */ @@ -986,16 +986,16 @@ pre_serialize(H5F_t H5_ATTR_NDEBUG_UNUSED *f, void *thing, haddr_t H5_ATTR_NDEBU /* set *new_len_ptr to the new length. */ - HDassert(entry->type == VARIABLE_ENTRY_TYPE); - HDassert(entry->size > 0); - HDassert(entry->size <= VARIABLE_ENTRY_SIZE); + assert(entry->type == VARIABLE_ENTRY_TYPE); + assert(entry->size > 0); + assert(entry->size <= VARIABLE_ENTRY_SIZE); *new_len_ptr = entry->size; } /* end if */ if (((*flags_ptr) & H5C__SERIALIZE_MOVED_FLAG) != 0) { - HDassert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0); + assert(((*flags_ptr) | H5C__SERIALIZE_RESIZED_FLAG) != 0); /* place the new address in *new_addr */ *new_addr_ptr = entry->addr; @@ -1109,35 +1109,35 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin test_entry_t *entry; int32_t type; - HDassert(image_ptr); - HDassert(thing); + assert(image_ptr); + assert(thing); entry = (test_entry_t *)thing; - HDassert(entry->self == entry); - HDassert(entry->size == len); + assert(entry->self == entry); + assert(entry->size == len); /* shouldn't serialize the entry unless it is dirty */ - HDassert(entry->is_dirty); + assert(entry->is_dirty); type = entry->type; - HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((entry->index >= 0) && (entry->index <= max_indices[type])); + assert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((entry->index >= 0) && (entry->index <= max_indices[type])); - HDassert(entry == &(entries[type][entry->index])); - HDassert(entry->num_flush_ops >= 0); - HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); + assert(entry == &(entries[type][entry->index])); + assert(entry->num_flush_ops >= 0); + assert(entry->num_flush_ops < MAX_FLUSH_OPS); /* null out the image to avoid spurious failures */ HDmemset(image_ptr, 0, len); if ((type == PICO_ENTRY_TYPE) || (type == VARIABLE_ENTRY_TYPE) || (type == NOTIFY_ENTRY_TYPE)) { - HDassert(entry->size >= PICO_ENTRY_SIZE); + assert(entry->size >= PICO_ENTRY_SIZE); *((char *)image_ptr) = (char)((entry->index) & 0xFF); } /* end if */ else { - HDassert(entry->size >= NANO_ENTRY_SIZE); + assert(entry->size >= NANO_ENTRY_SIZE); *((char *)image_ptr) = (char)((entry->type) & 0xFF); *(((char *)image_ptr) + 1) = (char)(((entry->index) & 0xFF00) >> 8); *(((char *)image_ptr) + 2) = (char)((entry->index) & 0xFF); @@ -1150,7 +1150,7 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin entry->is_dirty = FALSE; if (entry->flush_dep_npar > 0) { - HDassert(entry->flush_dep_ndirty_chd == 0); + assert(entry->flush_dep_ndirty_chd == 0); mark_flush_dep_clean(entry); } /* end if */ @@ -1254,19 +1254,19 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en { test_entry_t *entry; - HDassert(thing); + assert(thing); entry = (test_entry_t *)thing; - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[entry->type]); - HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); - HDassert(entry->type == entry_type); - HDassert(entry == &(entries[entry->type][entry->index])); - HDassert(entry == entry->self); + assert(entry->index >= 0); + assert(entry->index <= max_indices[entry->type]); + assert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); + assert(entry->type == entry_type); + assert(entry == &(entries[entry->type][entry->index])); + assert(entry == entry->self); if (!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE)) - HDassert(entry->header.addr == entry->addr); - HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type])); + assert(entry->header.addr == entry->addr); + assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type])); /* Increment count for appropriate action */ switch (action) { @@ -1290,7 +1290,7 @@ notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_NDEBUG_UNUSED en break; default: - HDassert(0 && "Unknown notify action!?!"); + assert(0 && "Unknown notify action!?!"); } /* end switch */ return (SUCCEED); @@ -1327,19 +1327,19 @@ notify_notify(H5C_notify_action_t action, void *thing) herr_t free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type) { - HDassert(entry); - - HDassert(entry->type == entry_type); - HDassert(entry->index >= 0); - HDassert(entry->index <= max_indices[entry->type]); - HDassert(entry == &(entries[entry->type][entry->index])); - HDassert(entry == entry->self); - HDassert(entry->cache_ptr != NULL); - HDassert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr)); - HDassert(entry->header.size == entry->size); - HDassert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type])); - HDassert(entry->header.tl_next == NULL); - HDassert(entry->header.tl_prev == NULL); + assert(entry); + + assert(entry->type == entry_type); + assert(entry->index >= 0); + assert(entry->index <= max_indices[entry->type]); + assert(entry == &(entries[entry->type][entry->index])); + assert(entry == entry->self); + assert(entry->cache_ptr != NULL); + assert((entry->header.destroy_in_progress) || (entry->header.addr == entry->addr)); + assert(entry->header.size == entry->size); + assert((entry->type == VARIABLE_ENTRY_TYPE) || (entry->size == entry_sizes[entry->type])); + assert(entry->header.tl_next == NULL); + assert(entry->header.tl_prev == NULL); if (entry->num_pins > 0) { int i; @@ -1351,21 +1351,21 @@ free_icr(test_entry_t *entry, int32_t H5_ATTR_NDEBUG_UNUSED entry_type) pinned_base_addr = entries[entry->pin_type[i]]; pinned_entry = &(pinned_base_addr[entry->pin_idx[i]]); - HDassert(0 <= pinned_entry->type); - HDassert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES); - HDassert(pinned_entry->type == entry->pin_type[i]); - HDassert(pinned_entry->index >= 0); - HDassert(pinned_entry->index <= max_indices[pinned_entry->type]); - HDassert(pinned_entry->index == entry->pin_idx[i]); - HDassert(pinned_entry == pinned_entry->self); - HDassert(pinned_entry->header.is_pinned); - HDassert(pinned_entry->is_pinned); - HDassert(pinned_entry->pinning_ref_count > 0); + assert(0 <= pinned_entry->type); + assert(pinned_entry->type < NUMBER_OF_ENTRY_TYPES); + assert(pinned_entry->type == entry->pin_type[i]); + assert(pinned_entry->index >= 0); + assert(pinned_entry->index <= max_indices[pinned_entry->type]); + assert(pinned_entry->index == entry->pin_idx[i]); + assert(pinned_entry == pinned_entry->self); + assert(pinned_entry->header.is_pinned); + assert(pinned_entry->is_pinned); + assert(pinned_entry->pinning_ref_count > 0); pinned_entry->pinning_ref_count--; if (pinned_entry->pinning_ref_count <= 0) { - HDassert(pinned_entry->file_ptr); + assert(pinned_entry->file_ptr); unpin_entry(pinned_entry->type, pinned_entry->index); } /* end if */ @@ -1478,23 +1478,23 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb test_entry_t *target_base_addr; test_entry_t *target_entry_ptr; - HDassert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= target_idx) && (target_idx <= max_indices[target_type])); - HDassert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP)); - HDassert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE)); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); - HDassert(new_size <= VARIABLE_ENTRY_SIZE); + assert((0 <= target_type) && (target_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= target_idx) && (target_idx <= max_indices[target_type])); + assert((0 <= op_code) && (op_code <= FLUSH_OP__MAX_OP)); + assert((op_code != FLUSH_OP__RESIZE) || (type == VARIABLE_ENTRY_TYPE)); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); + assert(new_size <= VARIABLE_ENTRY_SIZE); if (pass) { target_base_addr = entries[target_type]; target_entry_ptr = &(target_base_addr[target_idx]); - HDassert(target_entry_ptr->index == target_idx); - HDassert(target_entry_ptr->type == target_type); - HDassert(target_entry_ptr == target_entry_ptr->self); - HDassert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS); + assert(target_entry_ptr->index == target_idx); + assert(target_entry_ptr->type == target_type); + assert(target_entry_ptr == target_entry_ptr->self); + assert(target_entry_ptr->num_flush_ops < MAX_FLUSH_OPS); i = (target_entry_ptr->num_flush_ops)++; (target_entry_ptr->flush_ops)[i].op_code = op_code; @@ -1540,10 +1540,10 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id if (pass) { - HDassert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type])); - HDassert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type])); + assert((0 <= pinning_type) && (pinning_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= pinning_idx) && (pinning_idx <= max_indices[pinning_type])); + assert((0 <= pinned_type) && (pinned_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= pinned_idx) && (pinned_idx <= max_indices[pinned_type])); pinning_base_addr = entries[pinning_type]; pinning_entry_ptr = &(pinning_base_addr[pinning_idx]); @@ -1551,15 +1551,15 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id pinned_base_addr = entries[pinned_type]; pinned_entry_ptr = &(pinned_base_addr[pinned_idx]); - HDassert(pinning_entry_ptr->index == pinning_idx); - HDassert(pinning_entry_ptr->type == pinning_type); - HDassert(pinning_entry_ptr == pinning_entry_ptr->self); - HDassert(pinning_entry_ptr->num_pins < MAX_PINS); + assert(pinning_entry_ptr->index == pinning_idx); + assert(pinning_entry_ptr->type == pinning_type); + assert(pinning_entry_ptr == pinning_entry_ptr->self); + assert(pinning_entry_ptr->num_pins < MAX_PINS); - HDassert(pinning_entry_ptr->index == pinning_idx); - HDassert(pinning_entry_ptr->type == pinning_type); - HDassert(pinning_entry_ptr == pinning_entry_ptr->self); - HDassert(!(pinning_entry_ptr->is_protected)); + assert(pinning_entry_ptr->index == pinning_idx); + assert(pinning_entry_ptr->type == pinning_type); + assert(pinning_entry_ptr == pinning_entry_ptr->self); + assert(!(pinning_entry_ptr->is_protected)); pinning_entry_ptr->pin_type[pinning_entry_ptr->num_pins] = pinned_type; pinning_entry_ptr->pin_idx[pinning_entry_ptr->num_pins] = pinned_idx; @@ -1603,16 +1603,16 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin) test_entry_t *base_addr; test_entry_t *entry_ptr; - HDassert(file_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(file_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); if (pass) { if (dirty_pin) { H5C_t *cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); + assert(cache_ptr); if (!entry_in_cache(cache_ptr, type, idx)) { @@ -1624,9 +1624,9 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin) base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); if (!((entry_ptr->header).is_pinned)) { @@ -1670,19 +1670,19 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o { H5C_t *cache_ptr; - HDassert(file_ptr); + assert(file_ptr); cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(entry_ptr != NULL); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->header.addr == entry_ptr->addr); - HDassert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size)); - HDassert(op_ptr != NULL); - HDassert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type])); - HDassert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type])); - HDassert(flags_ptr != NULL); + assert(cache_ptr != NULL); + assert(entry_ptr != NULL); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->header.addr == entry_ptr->addr); + assert((entry_ptr->flush_op_self_resize_in_progress) || (entry_ptr->header.size == entry_ptr->size)); + assert(op_ptr != NULL); + assert((0 <= entry_ptr->type) && (entry_ptr->type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= entry_ptr->index) && (entry_ptr->index <= max_indices[entry_ptr->type])); + assert((0 <= op_ptr->type) && (op_ptr->type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= op_ptr->idx) && (op_ptr->idx <= max_indices[op_ptr->type])); + assert(flags_ptr != NULL); if (pass) { @@ -1691,7 +1691,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o break; case FLUSH_OP__DIRTY: - HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); + assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); dirty_entry(file_ptr, op_ptr->type, op_ptr->idx, op_ptr->flag); break; @@ -1702,9 +1702,9 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o /* the flush operation is acting on the entry to * which it is attached. Handle this here: */ - HDassert(entry_ptr->type == VARIABLE_ENTRY_TYPE); - HDassert(op_ptr->size > 0); - HDassert(op_ptr->size <= VARIABLE_ENTRY_SIZE); + assert(entry_ptr->type == VARIABLE_ENTRY_TYPE); + assert(op_ptr->size > 0); + assert(op_ptr->size <= VARIABLE_ENTRY_SIZE); entry_ptr->size = op_ptr->size; @@ -1727,16 +1727,16 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o * which it is attached. Handle this here: */ - HDassert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0); + assert(((*flags_ptr) & H5C__SERIALIZE_RESIZED_FLAG) != 0); (*flags_ptr) |= H5C__SERIALIZE_MOVED_FLAG; if (op_ptr->flag) { - HDassert(entry_ptr->addr == entry_ptr->alt_addr); + assert(entry_ptr->addr == entry_ptr->alt_addr); entry_ptr->addr = entry_ptr->main_addr; entry_ptr->at_main_addr = TRUE; } /* end if */ else { - HDassert(entry_ptr->addr == entry_ptr->main_addr); + assert(entry_ptr->addr == entry_ptr->main_addr); entry_ptr->addr = entry_ptr->alt_addr; entry_ptr->at_main_addr = FALSE; } /* end else */ @@ -1746,7 +1746,7 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o break; case FLUSH_OP__ORDER: - HDassert(op_ptr->order_ptr); + assert(op_ptr->order_ptr); entry_ptr->flush_order = *op_ptr->order_ptr; (*op_ptr->order_ptr)++; break; @@ -1766,12 +1766,12 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o * must always be executed on an entry other than the * entry being flushed. */ - HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); + assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); expunge_entry(file_ptr, op_ptr->type, op_ptr->idx); break; case FLUSH_OP__DEST_FLUSH_DEP: - HDassert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); + assert((entry_ptr->type != op_ptr->type) || (entry_ptr->index != op_ptr->idx)); destroy_flush_dependency(op_ptr->type, op_ptr->idx, entry_ptr->type, entry_ptr->index); break; @@ -1806,24 +1806,24 @@ entry_in_cache(H5C_t *cache_ptr, int32_t type, int32_t idx) test_entry_t *entry_ptr; H5C_cache_entry_t *test_ptr = NULL; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); H5C_TEST__SEARCH_INDEX(cache_ptr, entry_ptr->addr, test_ptr) if (test_ptr != NULL) { in_cache = TRUE; - HDassert(test_ptr == (H5C_cache_entry_t *)entry_ptr); - HDassert(entry_ptr->addr == entry_ptr->header.addr); + assert(test_ptr == (H5C_cache_entry_t *)entry_ptr); + assert(entry_ptr->addr == entry_ptr->header.addr); } return (in_cache); @@ -2044,8 +2044,8 @@ reset_entries(void) base_addr = entries[i]; orig_base_addr = orig_entries[i]; - HDassert(base_addr); - HDassert(orig_base_addr); + assert(base_addr); + assert(orig_base_addr); for (j = 0; j <= max_index; j++) { int k; @@ -2178,17 +2178,17 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_ test_entry_t *entry_ptr; herr_t result; - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert(type == VARIABLE_ENTRY_TYPE); - HDassert((0 <= idx) && (idx <= max_indices[type])); - HDassert((0 < new_size) && (new_size <= entry_sizes[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert(type == VARIABLE_ENTRY_TYPE); + assert((0 <= idx) && (idx <= max_indices[type])); + assert((0 < new_size) && (new_size <= entry_sizes[type])); if (pass) { if (in_cache) { H5C_t *cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); + assert(cache_ptr); if (!entry_in_cache(cache_ptr, type, idx)) { @@ -2200,10 +2200,10 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_ base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr->cache_ptr == cache_ptr); - HDassert(entry_ptr == entry_ptr->self); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr->cache_ptr == cache_ptr); + assert(entry_ptr == entry_ptr->self); if (!(entry_ptr->header.is_pinned || entry_ptr->header.is_protected)) { @@ -2228,7 +2228,7 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_ } else { - HDassert(entry_ptr->size == (entry_ptr->header).size); + assert(entry_ptr->size == (entry_ptr->header).size); } } } @@ -2275,7 +2275,7 @@ verify_clean(void) max_index = max_indices[i]; base_addr = entries[i]; - HDassert(base_addr); + assert(base_addr); for (j = 0; j <= max_index; j++) { if ((base_addr[j].header.is_dirty) || (base_addr[j].is_dirty)) { @@ -2642,10 +2642,10 @@ verify_unprotected(void) max_index = max_indices[i]; base_addr = entries[i]; - HDassert(base_addr); + assert(base_addr); for (j = 0; j <= max_index; j++) { - HDassert(base_addr[j].header.is_protected == base_addr[j].is_protected); + assert(base_addr[j].header.is_protected == base_addr[j].is_protected); if ((base_addr[j].header.is_protected) || (base_addr[j].is_protected)) { @@ -2688,23 +2688,23 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx) #ifndef NDEBUG H5C_t *cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); + assert(cache_ptr); #endif /* NDEBUG */ - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->cache_ptr == cache_ptr); - HDassert(!(entry_ptr->header.is_protected)); - HDassert(!(entry_ptr->is_protected)); - HDassert(!(entry_ptr->header.is_pinned)); - HDassert(!(entry_ptr->is_pinned)); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->cache_ptr == cache_ptr); + assert(!(entry_ptr->header.is_protected)); + assert(!(entry_ptr->is_protected)); + assert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->is_pinned)); result = H5C_expunge_entry(file_ptr, types[type], entry_ptr->addr, H5C__NO_FLAGS_SET); @@ -2745,7 +2745,7 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_ if (pass) { H5C_t *cache_ptr; - HDassert(file_ptr); + assert(file_ptr); cache_ptr = file_ptr->shared->cache; @@ -2803,8 +2803,8 @@ cork_entry_type(H5F_t *file_ptr, int32_t type) cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); baddrs = base_addrs[type]; if (H5C_cork(cache_ptr, baddrs, H5C__SET_CORK, NULL) < 0) { @@ -2838,8 +2838,8 @@ uncork_entry_type(H5F_t *file_ptr, int32_t type) cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); baddrs = base_addrs[type]; if (H5C_cork(cache_ptr, baddrs, H5C__UNCORK, NULL) < 0) { @@ -2879,20 +2879,20 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); baddrs = base_addrs[type]; - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(!(entry_ptr->is_protected)); - HDassert(entry_ptr->flush_dep_npar == 0); - HDassert(entry_ptr->flush_dep_nchd == 0); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(!(entry_ptr->is_protected)); + assert(entry_ptr->flush_dep_npar == 0); + assert(entry_ptr->flush_dep_nchd == 0); insert_pinned = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0); @@ -2926,23 +2926,23 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) (int)(entry_ptr->addr != entry_ptr->header.addr)); #endif } /* end if */ - HDassert(entry_ptr->cache_ptr == NULL); + assert(entry_ptr->cache_ptr == NULL); entry_ptr->file_ptr = file_ptr; entry_ptr->cache_ptr = cache_ptr; if (insert_pinned) - HDassert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.is_pinned); else - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_pinned)); entry_ptr->is_pinned = insert_pinned; entry_ptr->pinned_from_client = insert_pinned; if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked) entry_ptr->is_corked = TRUE; - HDassert(entry_ptr->header.is_dirty); - HDassert(((entry_ptr->header).type)->id == type); + assert(entry_ptr->header.is_dirty); + assert(((entry_ptr->header).type)->id == type); } /* end if */ } /* insert_entry() */ @@ -2972,16 +2972,16 @@ mark_entry_dirty(int32_t type, int32_t idx) if (pass) { - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->header.is_protected || entry_ptr->header.is_pinned); was_dirty = entry_ptr->is_dirty; entry_ptr->is_dirty = TRUE; @@ -3001,7 +3001,7 @@ mark_entry_dirty(int32_t type, int32_t idx) failure_mssg = "error in H5C_mark_entry_dirty()."; } - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); } } /* mark_entry_dirty() */ @@ -3033,25 +3033,25 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr) if (pass) { - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->cache_ptr == cache_ptr); - HDassert(!entry_ptr->is_read_only); - HDassert(!entry_ptr->header.is_read_only); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->cache_ptr == cache_ptr); + assert(!entry_ptr->is_read_only); + assert(!entry_ptr->header.is_read_only); if (entry_ptr->at_main_addr && !main_addr) { /* move to alt addr */ - HDassert(entry_ptr->addr == entry_ptr->main_addr); + assert(entry_ptr->addr == entry_ptr->main_addr); done = FALSE; old_addr = entry_ptr->addr; @@ -3061,7 +3061,7 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr) /* move to main addr */ - HDassert(entry_ptr->addr == entry_ptr->alt_addr); + assert(entry_ptr->addr == entry_ptr->alt_addr); done = FALSE; old_addr = entry_ptr->addr; @@ -3096,10 +3096,10 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr) } } - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->is_dirty); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->is_dirty); } } /* move_entry() */ @@ -3130,18 +3130,18 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx) if (pass) { cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); baddrs = base_addrs[type]; - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(!(entry_ptr->is_protected)); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(!(entry_ptr->is_protected)); /* Set the base address of the entry type into the property list as tag */ /* Use to cork entries for the object */ @@ -3186,7 +3186,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx) } /* end if */ else { - HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); + assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); entry_ptr->cache_ptr = cache_ptr; entry_ptr->file_ptr = file_ptr; @@ -3197,7 +3197,7 @@ protect_entry(H5F_t *file_ptr, int32_t type, int32_t idx) if (entry_ptr->header.tag_info && entry_ptr->header.tag_info->corked) entry_ptr->is_corked = TRUE; - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); } /* end if */ } /* protect_entry() */ @@ -3230,18 +3230,17 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert(cache_ptr); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert((!(entry_ptr->is_protected)) || - ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0))); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert((!(entry_ptr->is_protected)) || ((entry_ptr->is_read_only) && (entry_ptr->ro_ref_count > 0))); cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, types[type], entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG); @@ -3256,7 +3255,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) } else { - HDassert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); + assert((entry_ptr->cache_ptr == NULL) || (entry_ptr->cache_ptr == cache_ptr)); entry_ptr->cache_ptr = cache_ptr; entry_ptr->file_ptr = file_ptr; @@ -3265,7 +3264,7 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) entry_ptr->ro_ref_count++; } - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); } } /* protect_entry_ro() */ @@ -3288,8 +3287,8 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) void pin_entry(int32_t type, int32_t idx) { - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); if (pass) { test_entry_t *base_addr; @@ -3299,11 +3298,11 @@ pin_entry(int32_t type, int32_t idx) base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->is_protected); - HDassert(!(entry_ptr->pinned_from_client)); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->is_protected); + assert(!(entry_ptr->pinned_from_client)); result = H5C_pin_protected_entry((void *)entry_ptr); @@ -3349,19 +3348,19 @@ unpin_entry(int32_t type, int32_t idx) test_entry_t *entry_ptr; if (pass) { - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->header.is_pinned); - HDassert(entry_ptr->header.pinned_from_client); - HDassert(entry_ptr->is_pinned); - HDassert(entry_ptr->pinned_from_client); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.pinned_from_client); + assert(entry_ptr->is_pinned); + assert(entry_ptr->pinned_from_client); result = H5C_unpin_entry(entry_ptr); @@ -3378,7 +3377,7 @@ unpin_entry(int32_t type, int32_t idx) entry_ptr->is_pinned = entry_ptr->pinned_from_cache; - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); } } /* unpin_entry() */ @@ -3408,24 +3407,24 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) test_entry_t *entry_ptr; if (pass) { - HDassert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= idx) && (idx <= max_indices[type])); + assert((0 <= type) && (type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= idx) && (idx <= max_indices[type])); base_addr = entries[type]; entry_ptr = &(base_addr[idx]); - HDassert(entry_ptr->index == idx); - HDassert(entry_ptr->type == type); - HDassert(entry_ptr == entry_ptr->self); - HDassert(entry_ptr->header.is_protected); - HDassert(entry_ptr->is_protected); + assert(entry_ptr->index == idx); + assert(entry_ptr->type == type); + assert(entry_ptr == entry_ptr->self); + assert(entry_ptr->header.is_protected); + assert(entry_ptr->is_protected); pin_flag_set = (hbool_t)((flags & H5C__PIN_ENTRY_FLAG) != 0); unpin_flag_set = (hbool_t)((flags & H5C__UNPIN_ENTRY_FLAG) != 0); - HDassert(!(pin_flag_set && unpin_flag_set)); - HDassert((!pin_flag_set) || (!(entry_ptr->is_pinned))); - HDassert((!unpin_flag_set) || (entry_ptr->is_pinned)); + assert(!(pin_flag_set && unpin_flag_set)); + assert((!pin_flag_set) || (!(entry_ptr->is_pinned))); + assert((!unpin_flag_set) || (entry_ptr->is_pinned)); if (flags & H5C__DIRTIED_FLAG) { hbool_t was_dirty = entry_ptr->is_dirty; @@ -3465,29 +3464,29 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) if (pin_flag_set) { - HDassert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.is_pinned); entry_ptr->pinned_from_client = TRUE; entry_ptr->is_pinned = TRUE; } else if (unpin_flag_set) { - HDassert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache); + assert(entry_ptr->header.is_pinned == entry_ptr->header.pinned_from_cache); entry_ptr->pinned_from_client = FALSE; entry_ptr->is_pinned = entry_ptr->pinned_from_cache; } } - HDassert(((entry_ptr->header).type)->id == type); + assert(((entry_ptr->header).type)->id == type); if ((flags & H5C__DIRTIED_FLAG) != 0 && ((flags & H5C__DELETED_FLAG) == 0)) { - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->is_dirty); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->is_dirty); } - HDassert(entry_ptr->header.is_protected == entry_ptr->is_protected); - HDassert(entry_ptr->header.is_read_only == entry_ptr->is_read_only); - HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count); + assert(entry_ptr->header.is_protected == entry_ptr->is_protected); + assert(entry_ptr->header.is_read_only == entry_ptr->is_read_only); + assert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count); } } /* unprotect_entry() */ @@ -3522,8 +3521,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t if (pass) { cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag >= 10); + assert(cache_ptr != NULL); + assert(lag >= 10); if (reset_stats) H5C_stats__reset(cache_ptr); @@ -3548,8 +3547,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t insert_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3560,8 +3558,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3572,8 +3569,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ /* (don't decrement tmp_idx) */ @@ -3584,8 +3580,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t move_entry(cache_ptr, type, tmp_idx, move_to_main_addr); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3596,8 +3591,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx -= 2; @@ -3608,8 +3602,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ if (do_mult_ro_protects) { @@ -3621,8 +3614,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry_ro(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3633,8 +3626,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry_ro(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3645,8 +3638,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry_ro(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ /* (don't decrement tmp_idx) */ @@ -3657,8 +3650,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3669,8 +3662,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3681,8 +3674,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ } /* if ( do_mult_ro_protects ) */ @@ -3692,8 +3685,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry(file_ptr, type, idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx = idx - lag + 2; @@ -3704,8 +3696,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ tmp_idx--; @@ -3716,8 +3707,7 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t protect_entry(file_ptr, type, tmp_idx); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ if (do_destroys) { @@ -3730,8 +3720,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); break; case 1: @@ -3741,8 +3731,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__NO_FLAGS_SET); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ else { if (verbose) @@ -3751,8 +3741,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end else */ break; @@ -3762,8 +3752,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); break; case 3: @@ -3773,8 +3763,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, H5C__DELETED_FLAG); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ else { if (verbose) @@ -3784,13 +3774,13 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t (dirty_destroys ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET) | H5C__DELETED_FLAG); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end else */ break; default: - HDassert(0); /* this can't happen... */ + assert(0); /* this can't happen... */ break; } /* end switch */ } /* end if */ @@ -3804,8 +3794,8 @@ row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t unprotect_entry(file_ptr, type, tmp_idx, (dirty_unprotects ? H5C__DIRTIED_FLAG : H5C__NO_FLAGS_SET)); - HDassert((!cache_ptr->slist_enabled) || - (cache_ptr->slist_size == cache_ptr->dirty_index_size)); + assert((!cache_ptr->slist_enabled) || + (cache_ptr->slist_size == cache_ptr->dirty_index_size)); } /* end if */ } /* end elseif */ @@ -3856,10 +3846,10 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag > 5); - HDassert(max_index >= 200); - HDassert(max_index <= MAX_ENTRIES); + assert(cache_ptr != NULL); + assert(lag > 5); + assert(max_index >= 200); + assert(max_index <= MAX_ENTRIES); if (reset_stats) { @@ -3948,8 +3938,8 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag >= 10); + assert(cache_ptr != NULL); + assert(lag >= 10); if (reset_stats) { @@ -4143,7 +4133,7 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t break; default: - HDassert(0); /* this can't happen... */ + assert(0); /* this can't happen... */ break; } } @@ -4208,10 +4198,10 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag > 5); - HDassert(max_index >= 200); - HDassert(max_index <= MAX_ENTRIES); + assert(cache_ptr != NULL); + assert(lag > 5); + assert(max_index >= 200); + assert(max_index <= MAX_ENTRIES); if (reset_stats) { @@ -4303,7 +4293,7 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++) local_max_index[i] = MIN(max_index, max_indices[i]); - HDassert(lag > 5); + assert(lag > 5); if (reset_stats) { @@ -4393,10 +4383,10 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag > 5); - HDassert(max_index >= 500); - HDassert(max_index <= MAX_ENTRIES); + assert(cache_ptr != NULL); + assert(lag > 5); + assert(max_index >= 500); + assert(max_index <= MAX_ENTRIES); if (reset_stats) { @@ -4496,12 +4486,12 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); + assert(cache_ptr != NULL); for (i = 0; i < NUMBER_OF_ENTRY_TYPES; i++) local_max_index[i] = MIN(max_index, max_indices[i]); - HDassert(lag > 5); + assert(lag > 5); if (reset_stats) { @@ -4600,10 +4590,10 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr != NULL); - HDassert(lag > 5); - HDassert(max_index >= 500); - HDassert(max_index <= MAX_ENTRIES); + assert(cache_ptr != NULL); + assert(lag > 5); + assert(max_index >= 500); + assert(max_index <= MAX_ENTRIES); local_max_index = MIN(max_index, MAX_ENTRIES); @@ -4687,10 +4677,10 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, void create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx) { - HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type])); - HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type])); + assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= par_idx) && (par_idx <= max_indices[par_type])); + assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type])); if (pass) { test_entry_t *par_base_addr; /* Base entry of parent's entry array */ @@ -4706,19 +4696,19 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int par_is_pinned = par_entry_ptr->header.is_pinned; /* Sanity check parent entry */ - HDassert(par_entry_ptr->index == par_idx); - HDassert(par_entry_ptr->type == par_type); - HDassert(par_entry_ptr->header.is_protected); - HDassert(par_entry_ptr == par_entry_ptr->self); + assert(par_entry_ptr->index == par_idx); + assert(par_entry_ptr->type == par_type); + assert(par_entry_ptr->header.is_protected); + assert(par_entry_ptr == par_entry_ptr->self); /* Get parent entry */ chd_base_addr = entries[chd_type]; chd_entry_ptr = &(chd_base_addr[chd_idx]); /* Sanity check child entry */ - HDassert(chd_entry_ptr->index == chd_idx); - HDassert(chd_entry_ptr->type == chd_type); - HDassert(chd_entry_ptr == chd_entry_ptr->self); + assert(chd_entry_ptr->index == chd_idx); + assert(chd_entry_ptr->type == chd_type); + assert(chd_entry_ptr == chd_entry_ptr->self); result = H5C_create_flush_dependency(par_entry_ptr, chd_entry_ptr); @@ -4730,13 +4720,13 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int } /* end if */ /* Update information about entries */ - HDassert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS); + assert(chd_entry_ptr->flush_dep_npar < MAX_FLUSH_DEP_PARS); chd_entry_ptr->flush_dep_par_type[chd_entry_ptr->flush_dep_npar] = par_type; chd_entry_ptr->flush_dep_par_idx[chd_entry_ptr->flush_dep_npar] = par_idx; chd_entry_ptr->flush_dep_npar++; par_entry_ptr->flush_dep_nchd++; if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) { - HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd); + assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd); par_entry_ptr->flush_dep_ndirty_chd++; } /* end if */ par_entry_ptr->pinned_from_cache = TRUE; @@ -4763,10 +4753,10 @@ create_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int void destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, int32_t chd_idx) { - HDassert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= par_idx) && (par_idx <= max_indices[par_type])); - HDassert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES)); - HDassert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type])); + assert((0 <= par_type) && (par_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= par_idx) && (par_idx <= max_indices[par_type])); + assert((0 <= chd_type) && (chd_type < NUMBER_OF_ENTRY_TYPES)); + assert((0 <= chd_idx) && (chd_idx <= max_indices[chd_type])); if (pass) { test_entry_t *par_base_addr; /* Base entry of parent's entry array */ @@ -4780,20 +4770,20 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in par_entry_ptr = &(par_base_addr[par_idx]); /* Sanity check parent entry */ - HDassert(par_entry_ptr->is_pinned); - HDassert(par_entry_ptr->pinned_from_cache); - HDassert(par_entry_ptr->flush_dep_nchd > 0); - HDassert(par_entry_ptr == par_entry_ptr->self); + assert(par_entry_ptr->is_pinned); + assert(par_entry_ptr->pinned_from_cache); + assert(par_entry_ptr->flush_dep_nchd > 0); + assert(par_entry_ptr == par_entry_ptr->self); /* Get parent entry */ chd_base_addr = entries[chd_type]; chd_entry_ptr = &(chd_base_addr[chd_idx]); /* Sanity check child entry */ - HDassert(chd_entry_ptr->index == chd_idx); - HDassert(chd_entry_ptr->type == chd_type); - HDassert(chd_entry_ptr->flush_dep_npar > 0); - HDassert(chd_entry_ptr == chd_entry_ptr->self); + assert(chd_entry_ptr->index == chd_idx); + assert(chd_entry_ptr->type == chd_type); + assert(chd_entry_ptr->flush_dep_npar > 0); + assert(chd_entry_ptr == chd_entry_ptr->self); if (H5C_destroy_flush_dependency(par_entry_ptr, chd_entry_ptr) < 0) { pass = FALSE; @@ -4805,7 +4795,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in if (chd_entry_ptr->flush_dep_par_type[i] == par_type && chd_entry_ptr->flush_dep_par_idx[i] == par_idx) break; - HDassert(i < chd_entry_ptr->flush_dep_npar); + assert(i < chd_entry_ptr->flush_dep_npar); if (i < chd_entry_ptr->flush_dep_npar - 1) HDmemmove(&chd_entry_ptr->flush_dep_par_type[i], &chd_entry_ptr->flush_dep_par_type[i + 1], (chd_entry_ptr->flush_dep_npar - i - 1) * sizeof(chd_entry_ptr->flush_dep_par_type[0])); @@ -4819,7 +4809,7 @@ destroy_flush_dependency(int32_t par_type, int32_t par_idx, int32_t chd_type, in par_entry_ptr->is_pinned = par_entry_ptr->pinned_from_client; } /* end if */ if (chd_entry_ptr->is_dirty || chd_entry_ptr->flush_dep_ndirty_chd > 0) { - HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0); + assert(par_entry_ptr->flush_dep_ndirty_chd > 0); par_entry_ptr->flush_dep_ndirty_chd--; if (!par_entry_ptr->is_dirty && par_entry_ptr->flush_dep_ndirty_chd == 0) mark_flush_dep_clean(par_entry_ptr); @@ -4846,7 +4836,7 @@ static void mark_flush_dep_dirty(test_entry_t *entry_ptr) { /* Sanity checks */ - HDassert(entry_ptr); + assert(entry_ptr); /* Iterate over the parent entries */ if (entry_ptr->flush_dep_npar) { @@ -4860,7 +4850,7 @@ mark_flush_dep_dirty(test_entry_t *entry_ptr) par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]); /* Sanity check */ - HDassert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd); + assert(par_entry_ptr->flush_dep_ndirty_chd < par_entry_ptr->flush_dep_nchd); /* Adjust the parent's number of dirty children */ par_entry_ptr->flush_dep_ndirty_chd++; @@ -4887,8 +4877,8 @@ static void mark_flush_dep_clean(test_entry_t *entry_ptr) { /* Sanity checks */ - HDassert(entry_ptr); - HDassert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0); + assert(entry_ptr); + assert(!entry_ptr->is_dirty && entry_ptr->flush_dep_ndirty_chd == 0); /* Iterate over the parent entries */ if (entry_ptr->flush_dep_npar) { @@ -4902,7 +4892,7 @@ mark_flush_dep_clean(test_entry_t *entry_ptr) par_entry_ptr = &(par_base_addr[entry_ptr->flush_dep_par_idx[u]]); /* Sanity check */ - HDassert(par_entry_ptr->flush_dep_ndirty_chd > 0); + assert(par_entry_ptr->flush_dep_ndirty_chd > 0); /* Adjust the parent's number of dirty children */ par_entry_ptr->flush_dep_ndirty_chd--; @@ -5327,7 +5317,7 @@ dump_LRU(H5F_t * file_ptr) H5C_cache_entry_t * entry_ptr = NULL; H5C_t *cache_ptr = file_ptr->shared->cache; - HDassert(cache_ptr); + assert(cache_ptr); entry_ptr = cache_ptr->LRU_head_ptr; diff --git a/test/cache_common.h b/test/cache_common.h index 83c5e6a..b49601b 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -429,7 +429,7 @@ typedef struct test_entry_t { if ((entry_ptr) != (cache_ptr)->index[k]) { \ if ((entry_ptr)->ht_next) \ (entry_ptr)->ht_next->ht_prev = (entry_ptr)->ht_prev; \ - HDassert((entry_ptr)->ht_prev != NULL); \ + assert((entry_ptr)->ht_prev != NULL); \ (entry_ptr)->ht_prev->ht_next = (entry_ptr)->ht_next; \ (cache_ptr)->index[k]->ht_prev = (entry_ptr); \ (entry_ptr)->ht_next = (cache_ptr)->index[k]; \ diff --git a/test/cache_image.c b/test/cache_image.c index b9b5a29..fc76ed6 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -112,9 +112,9 @@ create_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); /* create the datasets */ @@ -423,9 +423,9 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); @@ -1004,9 +1004,9 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); /* open the datasets */ @@ -6625,7 +6625,7 @@ cache_image_api_error_check_4(hbool_t single_file_vfd) #if H5C_COLLECT_CACHE_STATS if (pass) { - HDassert(cache_ptr); + assert(cache_ptr); if (cache_ptr->images_loaded != 0) { @@ -7658,7 +7658,7 @@ evict_on_close_test(hbool_t H5_ATTR_PARALLEL_UNUSED single_file_vfd) if (verbose) { - HDassert(cache_ptr); + assert(cache_ptr); HDfprintf(stdout, "index size / index dirty size = %lld / %lld\n", (long long)(cache_ptr->index_size), (long long)(cache_ptr->dirty_index_size)); diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 226b526..1155110 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -582,7 +582,7 @@ test_compound(char *filename, hid_t fapl) /* Read the dataset */ s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t)); - HDassert(s8); + assert(s8); if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) { goto error; } @@ -715,7 +715,7 @@ test_compound(char *filename, hid_t fapl) h_size[0] = 2 * NX / 3 - f_offset[0]; h_size[1] = 2 * NY / 3 - f_offset[1]; s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t)); - HDassert(s11); + assert(s11); /* Initialize */ for (i = 0; i < h_size[0] * h_size[1]; i++) { diff --git a/test/dsets.c b/test/dsets.c index c4693d1..d44a7ad 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -380,13 +380,13 @@ test_create(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - HDassert(space >= 0); + assert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -455,13 +455,13 @@ test_create(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - HDassert(create_parms >= 0); + assert(create_parms >= 0); /* Attempt to create a dataset with invalid chunk sizes */ csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - HDassert(status >= 0); + assert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, @@ -477,7 +477,7 @@ test_create(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - HDassert(status >= 0); + assert(status >= 0); dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -499,11 +499,11 @@ test_create(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - HDassert(create_parms >= 0); + assert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - HDassert(status >= 0); + assert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - HDassert(status >= 0); + assert(status >= 0); dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -576,7 +576,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl) /* Create a small conversion buffer to test strip mining */ tconv_buf = HDmalloc((size_t)1000); xfer = H5Pcreate(H5P_DATASET_XFER); - HDassert(xfer >= 0); + assert(xfer >= 0); if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0) goto error; @@ -7850,7 +7850,7 @@ make_random_offset_and_increment(long nelts, long *offsetp, long *incp) long inc; long maxinc; - HDassert(0 < nelts); + assert(0 < nelts); *offsetp = HDrandom() % nelts; @@ -7907,7 +7907,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) TESTING(testname); - HDassert(NPOINTS < 100); + assert(NPOINTS < 100); h5_fixname(FILENAME[6], fapl, filename, sizeof filename); @@ -7953,7 +7953,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); - HDassert(!check2[chunk_row][chunk_col]); + assert(!check2[chunk_row][chunk_col]); wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1; coord[i][0] = (hsize_t)chunk_row * csize[0]; @@ -8113,7 +8113,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); - HDassert(!check2[chunk_row][chunk_col]); + assert(!check2[chunk_row][chunk_col]); wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1; coord[i][0] = (hsize_t)chunk_row * csize[0]; @@ -8251,7 +8251,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); - HDassert(!check2[chunk_row][chunk_col]); + assert(!check2[chunk_row][chunk_col]); wbuf[i] = check2[chunk_row][chunk_col] = chunk_row + chunk_col + 1; coord[i][0] = (hsize_t)chunk_row * csize[0]; @@ -8428,13 +8428,13 @@ test_deprec(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - HDassert(space >= 0); + assert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - HDassert(space >= 0); + assert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -8493,7 +8493,7 @@ test_deprec(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - HDassert(create_parms >= 0); + assert(create_parms >= 0); /* Add the deflate filter, if available */ #if defined H5_HAVE_FILTER_DEFLATE @@ -8529,7 +8529,7 @@ test_deprec(hid_t file) csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - HDassert(status >= 0); + assert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms); @@ -8544,7 +8544,7 @@ test_deprec(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - HDassert(status >= 0); + assert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0) goto error; @@ -8569,11 +8569,11 @@ test_deprec(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - HDassert(create_parms >= 0); + assert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - HDassert(status >= 0); + assert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - HDassert(status >= 0); + assert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) < 0) @@ -10881,7 +10881,7 @@ test_fixed_array(hid_t fapl) H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); - HDassert(!chunks[chunk_row][chunk_col]); + assert(!chunks[chunk_row][chunk_col]); wbuf[i] = chunks[chunk_row][chunk_col] = chunk_row + chunk_col + 1; coord[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; @@ -11031,7 +11031,7 @@ test_fixed_array(hid_t fapl) H5_CHECKED_ASSIGN(chunk_row, int, ofs / cols, long); H5_CHECKED_ASSIGN(chunk_col, int, ofs % cols, long); ofs = (ofs + inc) % (rows * cols); - HDassert(!chunks_big[chunk_row][chunk_col]); + assert(!chunks_big[chunk_row][chunk_col]); wbuf_big[i] = chunks_big[chunk_row][chunk_col] = chunk_row + chunk_col + 1; coord_big[i][0] = (hsize_t)chunk_row * chunk_dim2[0]; @@ -13254,7 +13254,7 @@ scatter_cb(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/, void *_sc /* Calculate number of elements */ nelmts = MIN(scatter_info->block, scatter_info->size); - HDassert(nelmts > 0); + assert(nelmts > 0); /* Set output variables */ *src_buf = (void *)scatter_info->src_buf; @@ -13553,7 +13553,7 @@ gather_cb(const void *dst_buf, size_t dst_buf_bytes_used, void *_gather_info) size_t nelmts; /* Number of elements in src_buf */ int i; /* Local index variable */ - HDassert(dst_buf_bytes_used > 0); + assert(dst_buf_bytes_used > 0); /* Calculate number of elements */ nelmts = dst_buf_bytes_used / sizeof(gather_info->expect_dst_buf[0]); @@ -13915,7 +13915,7 @@ scatter_error_cb_fail(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/ /* Calculate number of elements */ nelmts = MIN(scatter_info->block, scatter_info->size); - HDassert(nelmts > 0); + assert(nelmts > 0); /* Set output variables */ *src_buf = (void *)scatter_info->src_buf; @@ -13932,7 +13932,7 @@ scatter_error_cb_null(void **src_buf /*out*/, size_t *src_buf_bytes_used /*out*/ /* Calculate number of elements */ nelmts = MIN(scatter_info->block, scatter_info->size); - HDassert(nelmts > 0); + assert(nelmts > 0); /* Set output variables */ *src_buf = NULL; diff --git a/test/dt_arith.c b/test/dt_arith.c index 842aca7..af4078e 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -1805,7 +1805,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -1857,7 +1857,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -1910,7 +1910,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -1962,7 +1962,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2014,7 +2014,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2066,7 +2066,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2118,7 +2118,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2170,7 +2170,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2222,7 +2222,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -2274,13 +2274,13 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } /* Make certain that there isn't some weird number of destination bits */ - HDassert(dst_nbits % 8 == 0); + assert(dst_nbits % 8 == 0); /* Are the two results the same? */ for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++) @@ -2456,7 +2456,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -2510,7 +2510,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -2554,7 +2554,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -2625,7 +2625,7 @@ test_conv_int_2(void) HDfflush(stdout); buf = (char *)HDcalloc(TMP_BUF_DIM1, TMP_BUF_DIM2); - HDassert(buf); + assert(buf); for (i = 1; i <= TMP_BUF_DIM1; i++) { for (j = 1; j <= TMP_BUF_DIM1; j++) { @@ -3308,7 +3308,7 @@ done: HDexit(MIN((int)fails_all_tests, 254)); else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL) HDexit(EXIT_SUCCESS); - HDassert(0 && "Should not reach this point!"); + assert(0 && "Should not reach this point!"); return 1; #else /* Restore the default error handler (set in h5_reset()) */ @@ -3337,7 +3337,7 @@ error: HDexit(MIN(MAX((int)fails_all_tests, 1), 254)); else if (run_test == TEST_DENORM || run_test == TEST_SPECIAL) HDexit(EXIT_FAILURE); - HDassert(0 && "Should not reach this point!"); + assert(0 && "Should not reach this point!"); return 1; #else /* Restore the default error handler (set in h5_reset()) */ @@ -3765,7 +3765,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3817,7 +3817,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3869,7 +3869,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case FLT_LDOUBLE: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3900,7 +3900,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3931,7 +3931,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3962,7 +3962,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -3993,7 +3993,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4024,7 +4024,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4055,7 +4055,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4086,7 +4086,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4117,7 +4117,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4148,7 +4148,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } @@ -4179,13 +4179,13 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) case INT_ULLONG: case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } } /* Make certain that there isn't some weird number of destination bits */ - HDassert(dst_nbits % 8 == 0); + assert(dst_nbits % 8 == 0); /* For Intel machines, the size of "long double" is 12 bytes, precision * is 80 bits; for AMD processors, the size of "long double" is 16 bytes, @@ -4382,7 +4382,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -4445,7 +4445,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -4495,7 +4495,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) break; case OTHER: default: - HDassert(0 && "Unknown type"); + assert(0 && "Unknown type"); break; } @@ -4552,7 +4552,7 @@ error: if (run_test == TEST_NORMAL) return MAX((int)fails_all_tests, 1); else { - HDassert(run_test == TEST_DENORM || run_test == TEST_SPECIAL); + assert(run_test == TEST_DENORM || run_test == TEST_SPECIAL); return 1; } } diff --git a/test/dtypes.c b/test/dtypes.c index ead76de..f6f99da 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -3766,7 +3766,7 @@ test_compound_18(void) /* Create compound datatype, but don't insert fields */ tid = H5Tcreate(H5T_COMPOUND, (size_t)8); - HDassert(tid > 0); + assert(tid > 0); /* Attempt to create file with compound datatype that has no fields */ /* Create File */ @@ -3776,7 +3776,7 @@ test_compound_18(void) /* Create a dataspace to use */ sid = H5Screate_simple(1, &dim, NULL); - HDassert(sid > 0); + assert(sid > 0); /* Create a dataset with the bad compound datatype */ H5E_BEGIN_TRY @@ -3791,7 +3791,7 @@ test_compound_18(void) /* Create a group */ gid = H5Gcreate2(file, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(gid > 0); + assert(gid > 0); /* Create an attribute with the bad compound datatype */ H5E_BEGIN_TRY @@ -5352,7 +5352,7 @@ test_conv_enum_2(void) /* Destination enum type */ dsttype = H5Tenum_create(H5T_NATIVE_INT); - HDassert(H5Tget_size(dsttype) > H5Tget_size(srctype)); + assert(H5Tget_size(dsttype) > H5Tget_size(srctype)); for (i = 0; i < 8; i++) H5Tenum_insert(dsttype, mname[i], &i); @@ -7608,11 +7608,11 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo /* Make copy of FAPL */ my_fapl = H5Pcopy(fapl); - HDassert(my_fapl > 0); + assert(my_fapl > 0); /* Use low/high version of file format */ status = H5Pset_libver_bounds(my_fapl, low, high); - HDassert(status >= 0); + assert(status >= 0); /* Set new format flag. Note: the case high < low should be caught in the caller */ use_at_least_v18 = 0; @@ -7621,80 +7621,80 @@ create_del_obj_named_test_file(const char *filename, hid_t fapl, H5F_libver_t lo /* Create a file creation property list (used for the root group's creation property list) */ fcpl = H5Pcreate(H5P_FILE_CREATE); - HDassert(fcpl > 0); + assert(fcpl > 0); if (use_at_least_v18) { /* Use dense link storage for all links in root group */ status = H5Pset_link_phase_change(fcpl, 0, 0); - HDassert(status >= 0); + assert(status >= 0); } /* end if */ /* Create file with attribute that uses committed datatype */ file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, my_fapl); - HDassert(file > 0); + assert(file > 0); /* Close FCPL */ status = H5Pclose(fcpl); - HDassert(status >= 0); + assert(status >= 0); /* Close FAPL */ status = H5Pclose(my_fapl); - HDassert(status >= 0); + assert(status >= 0); /* Create datatype to commit */ type = H5Tvlen_create(H5T_NATIVE_INT); - HDassert(type > 0); + assert(type > 0); /* Commit datatype */ status = H5Tcommit2(file, DEL_OBJ_NAMED_NAMED_DTYPE, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(status >= 0); + assert(status >= 0); /* Create scalar dataspace */ space = H5Screate(H5S_SCALAR); - HDassert(space > 0); + assert(space > 0); /* Create a dataset creation property list */ dcpl = H5Pcreate(H5P_DATASET_CREATE); - HDassert(dcpl > 0); + assert(dcpl > 0); if (use_at_least_v18) { /* Use dense attribute storage for all attributes on dataset */ status = H5Pset_attr_phase_change(dcpl, 0, 0); - HDassert(status >= 0); + assert(status >= 0); } /* end if */ /* Create dataset */ dset = H5Dcreate2(file, DEL_OBJ_NAMED_DATASET, type, space, H5P_DEFAULT, dcpl, H5P_DEFAULT); - HDassert(dset > 0); + assert(dset > 0); /* Close DCPL */ status = H5Pclose(dcpl); - HDassert(status >= 0); + assert(status >= 0); /* Close dataset */ status = H5Dclose(dset); - HDassert(status >= 0); + assert(status >= 0); /* Create attribute */ attr = H5Acreate_by_name(file, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(attr > 0); + assert(attr > 0); /* Close dataspace */ status = H5Sclose(space); - HDassert(status >= 0); + assert(status >= 0); /* Close datatype */ status = H5Tclose(type); - HDassert(status >= 0); + assert(status >= 0); /* Close attribute */ status = H5Aclose(attr); - HDassert(status >= 0); + assert(status >= 0); /* Close file */ status = H5Fclose(file); - HDassert(status >= 0); + assert(status >= 0); } /* end create_del_obj_named_test_file() */ /*------------------------------------------------------------------------- diff --git a/test/earray.c b/test/earray.c index 5e0fdef..0ce1b32 100644 --- a/test/earray.c +++ b/test/earray.c @@ -230,7 +230,7 @@ init_tparam(earray_test_param_t *tparam, const H5EA_create_t *cparam) /* Allocate information for each super block */ tparam->sblk_info = (H5EA_sblk_info_t *)HDmalloc(sizeof(H5EA_sblk_info_t) * tparam->nsblks); - HDassert(tparam->sblk_info); + assert(tparam->sblk_info); /* Compute information about each super block */ start_idx = 0; @@ -1301,7 +1301,7 @@ eiter_fw_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_para /* Allocate space for the element iteration object */ eiter = (eiter_fw_t *)HDmalloc(sizeof(eiter_fw_t)); - HDassert(eiter); + assert(eiter); /* Initialize the element iteration object */ eiter->idx = 0; @@ -1331,7 +1331,7 @@ eiter_fw_next(void *in_eiter) hssize_t ret_val; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Get the next array index to test */ ret_val = (hssize_t)eiter->idx++; @@ -1358,7 +1358,7 @@ eiter_fw_max(const void *in_eiter) const eiter_fw_t *eiter = (const eiter_fw_t *)in_eiter; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Return the max. array index used */ return ((hssize_t)(eiter->idx - 1)); @@ -1384,10 +1384,10 @@ eiter_fw_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_pa eiter_fw_t *eiter = (eiter_fw_t *)in_eiter; /* Sanity check */ - HDassert(eiter); - HDassert(cparam); - HDassert(tparam); - HDassert(state); + assert(eiter); + assert(cparam); + assert(tparam); + assert(state); /* Compute the state of the extensible array */ state->hdr_size = EA_HDR_SIZE; @@ -1441,7 +1441,7 @@ static int eiter_fw_term(void *eiter) { /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Free iteration object */ HDfree(eiter); @@ -1488,7 +1488,7 @@ eiter_rv_init(const H5EA_create_t *cparam, const earray_test_param_t *tparam, hs /* Allocate space for the element iteration object */ eiter = (eiter_rv_t *)HDmalloc(sizeof(eiter_rv_t)); - HDassert(eiter); + assert(eiter); /* Initialize reverse iteration info */ eiter->idx = cnt - 1; @@ -1531,7 +1531,7 @@ eiter_rv_next(void *in_eiter) hssize_t ret_val; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Get the next array index to test */ ret_val = (hssize_t)eiter->idx--; @@ -1558,7 +1558,7 @@ eiter_rv_max(const void *in_eiter) const eiter_rv_t *eiter = (const eiter_rv_t *)in_eiter; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Return the max. array index used */ return ((hssize_t)eiter->max); @@ -1584,10 +1584,10 @@ eiter_rv_state(void *in_eiter, const H5EA_create_t *cparam, const earray_test_pa eiter_rv_t *eiter = (eiter_rv_t *)in_eiter; /* Sanity check */ - HDassert(eiter); - HDassert(cparam); - HDassert(tparam); - HDassert(state); + assert(eiter); + assert(cparam); + assert(tparam); + assert(state); /* Compute the state of the extensible array */ state->hdr_size = EA_HDR_SIZE; @@ -1666,7 +1666,7 @@ static int eiter_rv_term(void *eiter) { /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Free iteration object */ HDfree(eiter); @@ -1712,11 +1712,11 @@ eiter_rnd_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par /* Allocate space for the element iteration object */ eiter = (eiter_rnd_t *)HDmalloc(sizeof(eiter_rnd_t)); - HDassert(eiter); + assert(eiter); /* Allocate space for the array of shuffled indices */ eiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt); - HDassert(eiter->idx); + assert(eiter->idx); /* Initialize reverse iteration info */ eiter->max = 0; @@ -1761,7 +1761,7 @@ eiter_rnd_next(void *in_eiter) hssize_t ret_val; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Get the next array index to test */ ret_val = (hssize_t)eiter->idx[eiter->pos]; @@ -1793,7 +1793,7 @@ eiter_rnd_max(const void *in_eiter) const eiter_rnd_t *eiter = (const eiter_rnd_t *)in_eiter; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Return the max. array index used */ return ((hssize_t)eiter->max); @@ -1818,8 +1818,8 @@ eiter_rnd_term(void *in_eiter) eiter_rnd_t *eiter = (eiter_rnd_t *)in_eiter; /* Sanity check */ - HDassert(eiter); - HDassert(eiter->idx); + assert(eiter); + assert(eiter->idx); /* Free shuffled index array */ HDfree(eiter->idx); @@ -1861,11 +1861,11 @@ eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_pa /* Allocate space for the element iteration object */ eiter = (eiter_rnd_t *)HDmalloc(sizeof(eiter_rnd_t)); - HDassert(eiter); + assert(eiter); /* Allocate space for the array of shuffled indices */ eiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt); - HDassert(eiter->idx); + assert(eiter->idx); /* Initialize reverse iteration info */ eiter->max = 0; @@ -1878,7 +1878,7 @@ eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_pa /* Allocate temporary index array */ tmp_idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)sparse_cnt); - HDassert(tmp_idx); + assert(tmp_idx); /* Initialize temporary index array, for shuffling */ for (u = 0; u < (size_t)sparse_cnt; u++) @@ -1943,7 +1943,7 @@ eiter_cyc_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_par /* Allocate space for the element iteration object */ eiter = (eiter_cyc_t *)HDmalloc(sizeof(eiter_cyc_t)); - HDassert(eiter); + assert(eiter); /* Initialize reverse iteration info */ eiter->max = 0; @@ -1975,7 +1975,7 @@ eiter_cyc_next(void *in_eiter) hssize_t ret_val; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Get the next array index to test */ ret_val = (hssize_t)eiter->pos; @@ -2009,7 +2009,7 @@ eiter_cyc_max(const void *in_eiter) const eiter_cyc_t *eiter = (const eiter_cyc_t *)in_eiter; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Return the max. array index used */ return ((hssize_t)eiter->max); @@ -2034,7 +2034,7 @@ eiter_cyc_term(void *in_eiter) eiter_cyc_t *eiter = (eiter_cyc_t *)in_eiter; /* Sanity check */ - HDassert(eiter); + assert(eiter); /* Free iteration object */ HDfree(eiter); diff --git a/test/farray.c b/test/farray.c index 5448865..6a19e34 100644 --- a/test/farray.c +++ b/test/farray.c @@ -216,8 +216,8 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state) size_t dblk_page_nelmts; /* # of elements per page */ /* Sanity check */ - HDassert(cparam); - HDassert(state); + assert(cparam); + assert(state); /* Compute the state of the fixed array */ state->hdr_size = FA_HDR_SIZE; @@ -983,7 +983,7 @@ fiter_fw_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_para /* Allocate space for the element iteration object */ fiter = (fiter_fw_t *)HDmalloc(sizeof(fiter_fw_t)); - HDassert(fiter); + assert(fiter); /* Initialize the element iteration object */ fiter->idx = 0; @@ -1009,7 +1009,7 @@ fiter_fw_next(void *_fiter) hssize_t ret_val; /* Sanity check */ - HDassert(fiter); + assert(fiter); /* Get the next array index to test */ ret_val = (hssize_t)fiter->idx++; @@ -1031,7 +1031,7 @@ static int fiter_term(void *fiter) { /* Sanity check */ - HDassert(fiter); + assert(fiter); /* Free iteration object */ HDfree(fiter); @@ -1069,7 +1069,7 @@ fiter_rv_init(const H5FA_create_t *cparam, const farray_test_param_t H5_ATTR_UNU /* Allocate space for the element iteration object */ fiter = (fiter_rv_t *)HDmalloc(sizeof(fiter_rv_t)); - HDassert(fiter); + assert(fiter); /* Initialize reverse iteration info */ fiter->idx = cparam->nelmts - 1; @@ -1095,7 +1095,7 @@ fiter_rv_next(void *_fiter) hssize_t ret_val; /* Sanity check */ - HDassert(fiter); + assert(fiter); /* Get the next array index to test */ ret_val = (hssize_t)fiter->idx--; @@ -1135,11 +1135,11 @@ fiter_rnd_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_par /* Allocate space for the element iteration object */ fiter = (fiter_rnd_t *)HDmalloc(sizeof(fiter_rnd_t)); - HDassert(fiter); + assert(fiter); /* Allocate space for the array of shuffled indices */ fiter->idx = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)cnt); - HDassert(fiter->idx); + assert(fiter->idx); /* Initialize reverse iteration info */ fiter->pos = 0; @@ -1180,7 +1180,7 @@ fiter_rnd_next(void *_fiter) hssize_t ret_val; /* Sanity check */ - HDassert(fiter); + assert(fiter); /* Get the next array index to test */ ret_val = (hssize_t)fiter->idx[fiter->pos]; @@ -1205,8 +1205,8 @@ fiter_rnd_term(void *_fiter) fiter_rnd_t *fiter = (fiter_rnd_t *)_fiter; /* Sanity check */ - HDassert(fiter); - HDassert(fiter->idx); + assert(fiter); + assert(fiter->idx); /* Free shuffled index array */ HDfree(fiter->idx); @@ -1249,7 +1249,7 @@ fiter_cyc_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_par /* Allocate space for the element iteration object */ fiter = (fiter_cyc_t *)HDmalloc(sizeof(fiter_cyc_t)); - HDassert(fiter); + assert(fiter); /* Initialize reverse iteration info */ fiter->pos = 0; @@ -1277,7 +1277,7 @@ fiter_cyc_next(void *_fiter) hssize_t ret_val; /* Sanity check */ - HDassert(fiter); + assert(fiter); /* Get the next array index to test */ ret_val = (hssize_t)fiter->pos; @@ -1356,7 +1356,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, h hsize_t fa_nelmts; /* # of elements in fixed array */ haddr_t fa_addr = HADDR_UNDEF; /* Array address in file */ - HDassert(nelmts); + assert(nelmts); /* * Display testing message */ diff --git a/test/fheap.c b/test/fheap.c index fb1c569..e9ce0a2 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -376,7 +376,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state, size_t robj_size; /* Object size read in */ /* Sanity check */ - HDassert(fh); + assert(fh); /* Initialize object buffer */ obj = &shared_wobj_g[obj_off]; @@ -510,7 +510,7 @@ get_fill_size(const fheap_test_param_t *tparam) case FHEAP_TEST_FILL_N: default: - HDassert(0 && "Unknown bulk fill type?!?"); + assert(0 && "Unknown bulk fill type?!?"); } /* end switch */ return (0); @@ -849,9 +849,9 @@ del_objs_half_refill(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_he size_t u; /* Local index variable */ /* Sanity check */ - HDassert(fh); - HDassert(*fh); - HDassert(keep_ids); + assert(fh); + assert(*fh); + assert(keep_ids); /* Check for closing & re-opening the heap */ if (tparam->reopen_heap) { @@ -940,10 +940,10 @@ del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_heap_state_t * size_t u; /* Local index variable */ /* Sanity check */ - HDassert(fh); - HDassert(*fh); - HDassert(state); - HDassert(keep_ids); + assert(fh); + assert(*fh); + assert(state); + assert(keep_ids); /* Check for first deleting half of objects & then re-inserting them */ if (tparam->drain_half == FHEAP_DEL_DRAIN_HALF) @@ -1037,9 +1037,9 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s unsigned u; /* Local index variable */ /* Sanity check */ - HDassert(fh); - HDassert(state); - HDassert(obj_size + 256 < shared_obj_size_g); + assert(fh); + assert(state); + assert(obj_size + 256 < shared_obj_size_g); /* Initialize starting information */ data_size = (size_t)DBLOCK_FREE(fh, block_row); @@ -1236,8 +1236,8 @@ fill_root_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *sta unsigned u; /* Local index variable */ /* Sanity check */ - HDassert(fh); - HDassert(state); + assert(fh); + assert(state); /* Get some information for the heap */ block_size = (size_t)DBLOCK_SIZE(fh, row); @@ -1325,8 +1325,8 @@ fill_partial_row(H5HF_t *fh, unsigned row, unsigned width, size_t obj_size, fhea unsigned u; /* Local index variable */ /* Sanity check */ - HDassert(fh); - HDassert(state); + assert(fh); + assert(state); /* Get some information for the heap */ block_size = (size_t)DBLOCK_SIZE(fh, row); @@ -1366,8 +1366,8 @@ static int fill_row(H5HF_t *fh, unsigned row, size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids) { /* Sanity check */ - HDassert(fh); - HDassert(state); + assert(fh); + assert(state); /* Fill the entire row (with the partial row fill routine) */ if (fill_partial_row(fh, row, DTABLE_WIDTH(fh), obj_size, state, keep_ids)) @@ -1405,7 +1405,7 @@ fill_root_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_h /* Get heap info */ max_dblock_rows = DTABLE_MAX_DROWS(fh); - HDassert(max_dblock_rows); + assert(max_dblock_rows); /* Loop over rows */ for (row = 0; row < max_dblock_rows; row++) @@ -1444,7 +1444,7 @@ fill_2nd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size, fheap_heap_state_t /* Get some information for the heap */ max_dblock_rows = IBLOCK_MAX_DROWS(fh, pos); - HDassert(max_dblock_rows); + assert(max_dblock_rows); /* Loop over rows */ for (row = 0; row < max_dblock_rows; row++) @@ -1481,7 +1481,7 @@ fill_all_direct(H5HF_t *fh, size_t obj_size, fheap_heap_state_t *state, fheap_he /* Get heap info */ max_dblock_rows = DTABLE_MAX_DROWS(fh); - HDassert(max_dblock_rows); + assert(max_dblock_rows); /* Loop over rows */ for (row = 0; row < max_dblock_rows; row++) @@ -15956,7 +15956,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) ret = H5HF_write(fh, huge_heap_id, &id_changed, shared_wobj_g); } H5E_END_TRY - HDassert(!id_changed); + assert(!id_changed); if (tparam->comp == FHEAP_TEST_COMPRESS) { if (ret >= 0) TEST_ERROR; @@ -15972,7 +15972,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) ret = H5HF_write(fh, tiny_heap_id, &id_changed, shared_wobj_g); } H5E_END_TRY - HDassert(!id_changed); + assert(!id_changed); if (ret >= 0) TEST_ERROR; @@ -16028,7 +16028,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam) /* Overwrite data just written */ if (H5HF_write(fh, &keep_ids.ids[id_len * u], &id_changed, rewrite_obj) < 0) FAIL_STACK_ERROR; - HDassert(!id_changed); + assert(!id_changed); /* Read data back in */ if (H5HF_read(fh, &keep_ids.ids[id_len * u], shared_robj_g) < 0) diff --git a/test/fillval.c b/test/fillval.c index 52b15ff..d701521 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -970,7 +970,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f /* case for atomic datatype */ if (datatype == H5T_INTEGER) { /*check for overflow*/ - HDassert((nelmts * sizeof(int)) == (hsize_t)((size_t)(nelmts * sizeof(int)))); + assert((nelmts * sizeof(int)) == (hsize_t)((size_t)(nelmts * sizeof(int)))); buf = (int *)HDmalloc((size_t)(nelmts * sizeof(int))); if (H5Dread(dset1, H5T_NATIVE_INT, mspace, fspace, H5P_DEFAULT, buf) < 0) @@ -996,7 +996,7 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f /* case for compound datatype */ else if (datatype == H5T_COMPOUND) { /*check for overflow*/ - HDassert((nelmts * sizeof(comp_datatype)) == (hsize_t)((size_t)(nelmts * sizeof(comp_datatype)))); + assert((nelmts * sizeof(comp_datatype)) == (hsize_t)((size_t)(nelmts * sizeof(comp_datatype)))); buf_c = (comp_datatype *)HDmalloc((size_t)nelmts * sizeof(comp_datatype)); if (H5Dread(dset2, ctype_id, mspace, fspace, H5P_DEFAULT, buf_c) < 0) @@ -1640,7 +1640,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end if */ else { /* Sanity check */ - HDassert(dtype_class == H5T_COMPOUND); + assert(dtype_class == H5T_COMPOUND); /* Initialize specific values for this datatype */ val_size = sizeof(comp_vl_datatype); @@ -1692,7 +1692,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end for */ /* Check for overflow */ - HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); + assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); /* Allocate & initialize buffer */ buf = HDmalloc((size_t)(nelmts * val_size)); diff --git a/test/freespace.c b/test/freespace.c index bd1737a..ad53693 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -198,8 +198,8 @@ TEST_sect_init_cls(H5FS_section_class_t *cls, void *_udata) unsigned *init_flags; /* Check arguments. */ - HDassert(cls); - HDassert(_udata); + assert(cls); + assert(_udata); init_flags = (unsigned *)_udata; cls->flags |= *init_flags; @@ -220,10 +220,10 @@ TEST_sect_can_merge(const H5FS_section_info_t *_sect1, const H5FS_section_info_t htri_t ret_value; /* Return value */ /* Check arguments. */ - HDassert(sect1); - HDassert(sect2); - HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ - HDassert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); + assert(sect1); + assert(sect2); + assert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ + assert(H5_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); /* Check if second section adjoins first section */ ret_value = H5_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); @@ -242,15 +242,15 @@ TEST_sect_merging(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, voi herr_t ret_value = SUCCEED; /* Return value */ /* Check arguments. */ - HDassert(sect1); - HDassert(((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE) || - ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) || - ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE)); - HDassert(sect2); - HDassert((sect2->sect_info.type == TEST_FSPACE_SECT_TYPE) || - (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) || - (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE)); - HDassert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); + assert(sect1); + assert(((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE) || + ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) || + ((*sect1)->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE)); + assert(sect2); + assert((sect2->sect_info.type == TEST_FSPACE_SECT_TYPE) || + (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NEW) || + (sect2->sect_info.type == TEST_FSPACE_SECT_TYPE_NONE)); + assert(H5_addr_eq((*sect1)->sect_info.addr + (*sect1)->sect_info.size, sect2->sect_info.addr)); /* Add second section's size to first section */ (*sect1)->sect_info.size += sect2->sect_info.size; @@ -334,8 +334,8 @@ TEST_sects_cb(H5FS_section_info_t *_sect, void *_udata) TEST_iter_ud_t *udata = (TEST_iter_ud_t *)_udata; herr_t ret_value = SUCCEED; /* Return value */ - HDassert(sect); - HDassert(udata); + assert(sect); + assert(udata); udata->tot_size += sect->sect_info.size; udata->tot_sect_count += 1; diff --git a/test/gen_cross.c b/test/gen_cross.c index 143451d..0d07ad1 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -1258,8 +1258,8 @@ main(void) /* Create memory space. This does not include the extra row for fill * values. */ - HDassert(dimsf[0] == NX); - HDassert(dimsf[1] == NY); + assert(dimsf[0] == NX); + assert(dimsf[1] == NY); if ((memspace = H5Screate_simple(RANK, dimsf, NULL)) < 0) TEST_ERROR; diff --git a/test/gen_new_super.c b/test/gen_new_super.c index 47d6d47..46855e7 100644 --- a/test/gen_new_super.c +++ b/test/gen_new_super.c @@ -48,10 +48,10 @@ main(void) /* Create a file creation property list */ fcpl = H5Pcreate(H5P_FILE_CREATE); - HDassert(fcpl >= 0); + assert(fcpl >= 0); ret = H5Pset_istore_k(fcpl, ISTORE_IK); - HDassert(ret >= 0); + assert(ret >= 0); /* Creating a file with the non-default file creation property list should * create a version 1 superblock @@ -59,15 +59,15 @@ main(void) /* Create file with custom file creation property list */ file = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, fcpl, H5P_DEFAULT); - HDassert(file >= 0); + assert(file >= 0); /* Close FCPL */ ret = H5Pclose(fcpl); - HDassert(ret >= 0); + assert(ret >= 0); /* Close file */ ret = H5Fclose(file); - HDassert(ret >= 0); + assert(ret >= 0); return EXIT_SUCCESS; } diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c index 12e00d4..84e7398 100644 --- a/test/gen_nullspace.c +++ b/test/gen_nullspace.c @@ -41,42 +41,42 @@ main(void) /* Create the file */ fid = H5Fcreate(NULLFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(fid > 0); + assert(fid > 0); sid = H5Screate(H5S_NULL); - HDassert(sid > 0); + assert(sid > 0); /* Create dataset */ did = H5Dcreate2(fid, NULLDATASET, H5T_NATIVE_UINT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(did > 0); + assert(did > 0); /* Close the dataset */ ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); /* Open the root group */ gid = H5Gopen2(fid, "/", H5P_DEFAULT); - HDassert(gid > 0); + assert(gid > 0); /* Create an attribute for the group */ attr = H5Acreate2(gid, NULLATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT); - HDassert(attr > 0); + assert(attr > 0); /* Close attribute */ ret = H5Aclose(attr); - HDassert(ret >= 0); + assert(ret >= 0); /* Close the group */ ret = H5Gclose(gid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close the dataspace */ ret = H5Sclose(sid); - HDassert(ret >= 0); + assert(ret >= 0); /* Close the file */ ret = H5Fclose(fid); - HDassert(ret >= 0); + assert(ret >= 0); return EXIT_SUCCESS; } diff --git a/test/gen_plist.c b/test/gen_plist.c index 5302dc7..0892755 100644 --- a/test/gen_plist.c +++ b/test/gen_plist.c @@ -457,23 +457,23 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil /* Generate filename */ if ((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length, little_endian ? "le" : "be")) < 0) - HDassert(ret > 0); + assert(ret > 0); /* first call to encode returns only the size of the buffer needed */ if ((ret = H5Pencode2(plist_id, NULL, &temp_size, H5P_DEFAULT)) < 0) - HDassert(ret > 0); + assert(ret > 0); temp_buf = (void *)HDmalloc(temp_size); - HDassert(temp_buf); + assert(temp_buf); if ((ret = H5Pencode2(plist_id, temp_buf, &temp_size, H5P_DEFAULT)) < 0) - HDassert(ret > 0); + assert(ret > 0); fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW); - HDassert(fd >= 0); + assert(fd >= 0); write_size = HDwrite(fd, temp_buf, temp_size); - HDassert(write_size == (ssize_t)temp_size); + assert(write_size == (ssize_t)temp_size); HDclose(fd); diff --git a/test/genall5.c b/test/genall5.c index 648dc92..64764c0 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -59,7 +59,7 @@ ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "ns_grp_0: H5Pcreate() failed"; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -69,7 +69,7 @@ ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "ns_grp_0: H5Pset_link_creation_order() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -79,7 +79,7 @@ ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "ns_grp_0: H5Gcreate2() failed"; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -89,7 +89,7 @@ ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "ns_grp_0: H5Pclose(gcpl) failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -99,7 +99,7 @@ ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "ns_grp_0: H5Gclose(gid) failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ns_grp_0 */ @@ -139,7 +139,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_ns_grp_0: H5Gopen2() failed"; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -149,7 +149,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_ns_grp_0: H5Gget_create_plist() failed"; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -163,8 +163,8 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_ns_grp_0: H5P_CRT_ORDER_TRACKED != crt_order_flags"; } - HDassert(ret >= 0); - HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags); + assert(ret >= 0); + assert(H5P_CRT_ORDER_TRACKED == crt_order_flags); } if (pass) { @@ -174,7 +174,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_ns_grp_0: H5Pclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -202,11 +202,11 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) failure_mssg = "vrfy_ns_grp_0: FALSE != grp_info.mounted"; } - HDassert(ret >= 0); - HDassert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type); - HDassert(0 == grp_info.nlinks); - HDassert(0 == grp_info.max_corder); - HDassert(FALSE == grp_info.mounted); + assert(ret >= 0); + assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type); + assert(0 == grp_info.nlinks); + assert(0 == grp_info.max_corder); + assert(FALSE == grp_info.mounted); } if (pass) { @@ -216,7 +216,7 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_ns_grp_0: H5Gclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ns_grp_0() */ @@ -256,7 +256,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Pcreate(H5P_GROUP_CREATE) failed"; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -266,7 +266,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Pset_link_creation_order() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -276,7 +276,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Gcreate2() failed"; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -296,9 +296,9 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) failure_mssg = "ns_grp_c: nlinks >= max_compact"; } - HDassert(ret >= 0); - HDassert(nlinks > 0); - HDassert(nlinks < max_compact); + assert(ret >= 0); + assert(nlinks > 0); + assert(nlinks < max_compact); } u = 0; @@ -314,7 +314,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Lcreate_soft() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end if */ else if (1 == (u % 3)) { ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -323,17 +323,17 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Lcreate_hard() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end else-if */ else { - HDassert(2 == (u % 3)); + assert(2 == (u % 3)); ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT); if (ret < 0) { pass = FALSE; failure_mssg = "ns_grp_c: H5Lcreate_external() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end else */ u++; @@ -346,7 +346,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Pclose(gcpl) failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -356,7 +356,7 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_c: H5Gclose(gid) failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ns_grp_c() */ @@ -397,7 +397,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Gopen2() failed"; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -407,7 +407,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Gget_create_plist(gid) failed"; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -421,8 +421,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5P_CRT_ORDER_TRACKED != crt_order_flags"; } - HDassert(ret >= 0); - HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags); + assert(ret >= 0); + assert(H5P_CRT_ORDER_TRACKED == crt_order_flags); } if (pass) { @@ -432,7 +432,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Pclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -460,11 +460,11 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) failure_mssg = "vrfy_ns_grp_c: FALSE != grp_info.mounted"; } - HDassert(ret >= 0); - HDassert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type); - HDassert(nlinks == grp_info.nlinks); - HDassert(nlinks == grp_info.max_corder); - HDassert(FALSE == grp_info.mounted); + assert(ret >= 0); + assert(H5G_STORAGE_TYPE_COMPACT == grp_info.storage_type); + assert(nlinks == grp_info.nlinks); + assert(nlinks == grp_info.max_corder); + assert(FALSE == grp_info.mounted); } u = 0; @@ -480,7 +480,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Lexists() failed"; } - HDassert(link_exists >= 0); + assert(link_exists >= 0); HDmemset(&lnk_info, 0, sizeof(grp_info)); ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT); @@ -501,10 +501,10 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5T_CSET_ASCII != lnk_info.cset"; } - HDassert(ret >= 0); - HDassert(TRUE == lnk_info.corder_valid); - HDassert(u == lnk_info.corder); - HDassert(H5T_CSET_ASCII == lnk_info.cset); + assert(ret >= 0); + assert(TRUE == lnk_info.corder_valid); + assert(u == lnk_info.corder); + assert(H5T_CSET_ASCII == lnk_info.cset); if (0 == (u % 3)) { char *slinkval; @@ -517,8 +517,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: (HDstrlen(group_name) + 1) != lnk_info.u.val_size"; } - HDassert(H5L_TYPE_SOFT == lnk_info.type); - HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); + assert(H5L_TYPE_SOFT == lnk_info.type); + assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); slinkval = (char *)HDmalloc(lnk_info.u.val_size); @@ -526,7 +526,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: HDmalloc of slinkval failed"; } - HDassert(slinkval); + assert(slinkval); ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT); if (ret < 0) { @@ -537,8 +537,8 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(slinkval, group_name)"; } - HDassert(ret >= 0); - HDassert(0 == HDstrcmp(slinkval, group_name)); + assert(ret >= 0); + assert(0 == HDstrcmp(slinkval, group_name)); HDfree(slinkval); } /* end if */ @@ -550,7 +550,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_HARD != lnk_info.type"; } - HDassert(H5L_TYPE_HARD == lnk_info.type); + assert(H5L_TYPE_HARD == lnk_info.type); HDmemset(&root_oinfo, 0, sizeof(root_oinfo)); ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC); @@ -570,21 +570,21 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) failure_mssg = "vrfy_ns_grp_c: root_oinfo.token != lnk_info.u.token"; } } - HDassert(ret >= 0); - HDassert(!token_cmp); + assert(ret >= 0); + assert(!token_cmp); } /* end else-if */ else { void *elinkval; const char *file = NULL; const char *path = NULL; - HDassert(2 == (u % 3)); + assert(2 == (u % 3)); if (H5L_TYPE_EXTERNAL != lnk_info.type) { pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5L_TYPE_EXTERNAL != lnk_info.type"; } - HDassert(H5L_TYPE_EXTERNAL == lnk_info.type); + assert(H5L_TYPE_EXTERNAL == lnk_info.type); elinkval = HDmalloc(lnk_info.u.val_size); @@ -592,14 +592,14 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: HDmalloc of elinkval failed."; } - HDassert(elinkval); + assert(elinkval); ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT); if (ret < 0) { pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Lget_val() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path); if (ret < 0) { @@ -614,9 +614,9 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: 0 != HDstrcmp(path, \"/ext\")"; } - HDassert(ret >= 0); - HDassert(0 == HDstrcmp(file, "external.h5")); - HDassert(0 == HDstrcmp(path, "/ext")); + assert(ret >= 0); + assert(0 == HDstrcmp(file, "external.h5")); + assert(0 == HDstrcmp(path, "/ext")); HDfree(elinkval); } /* end else */ @@ -631,7 +631,7 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_c: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ns_grp_c() */ @@ -671,7 +671,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Pcreate() failed."; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -681,7 +681,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Pset_link_creation_order() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -691,7 +691,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Gcreate2() failed."; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -706,8 +706,8 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: nlinks <= max_compact"; } - HDassert(ret >= 0); - HDassert(nlinks > max_compact); + assert(ret >= 0); + assert(nlinks > max_compact); } u = 0; @@ -723,7 +723,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Lcreate_soft() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end if */ else if (1 == (u % 3)) { ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -732,10 +732,10 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Lcreate_hard() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end else-if */ else { - HDassert(2 == (u % 3)); + assert(2 == (u % 3)); ret = H5Lcreate_external("external.h5", "/ext", gid, linkname, H5P_DEFAULT, H5P_DEFAULT); @@ -743,7 +743,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Lcreate_external() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end else */ u++; @@ -756,7 +756,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -766,7 +766,7 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "ns_grp_d: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ns_grp_d() */ @@ -807,7 +807,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Gopen2() failed."; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -817,7 +817,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Gget_create_plist() failed."; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -831,8 +831,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5P_CRT_ORDER_TRACKED != crt_order_flags"; } - HDassert(ret >= 0); - HDassert(H5P_CRT_ORDER_TRACKED == crt_order_flags); + assert(ret >= 0); + assert(H5P_CRT_ORDER_TRACKED == crt_order_flags); } if (pass) { @@ -842,7 +842,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -869,11 +869,11 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: FALSE != grp_info.mounted"; } - HDassert(ret >= 0); - HDassert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type); - HDassert(nlinks == grp_info.nlinks); - HDassert(nlinks == grp_info.max_corder); - HDassert(FALSE == grp_info.mounted); + assert(ret >= 0); + assert(H5G_STORAGE_TYPE_DENSE == grp_info.storage_type); + assert(nlinks == grp_info.nlinks); + assert(nlinks == grp_info.max_corder); + assert(FALSE == grp_info.mounted); } u = 0; @@ -889,7 +889,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Lexists() failed."; } - HDassert(link_exists >= 0); + assert(link_exists >= 0); HDmemset(&lnk_info, 0, sizeof(grp_info)); ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT); @@ -910,10 +910,10 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5T_CSET_ASCII != lnk_info.cset"; } - HDassert(ret >= 0); - HDassert(TRUE == lnk_info.corder_valid); - HDassert(u == lnk_info.corder); - HDassert(H5T_CSET_ASCII == lnk_info.cset); + assert(ret >= 0); + assert(TRUE == lnk_info.corder_valid); + assert(u == lnk_info.corder); + assert(H5T_CSET_ASCII == lnk_info.cset); if (0 == (u % 3)) { char *slinkval; @@ -926,8 +926,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_SOFT != lnk_info.type"; } - HDassert(H5L_TYPE_SOFT == lnk_info.type); - HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); + assert(H5L_TYPE_SOFT == lnk_info.type); + assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); slinkval = (char *)HDmalloc(lnk_info.u.val_size); @@ -935,7 +935,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: HDmalloc of slinkval failed"; } - HDassert(slinkval); + assert(slinkval); ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT); if (ret < 0) { @@ -946,8 +946,8 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(slinkval, group_name)"; } - HDassert(ret >= 0); - HDassert(0 == HDstrcmp(slinkval, group_name)); + assert(ret >= 0); + assert(0 == HDstrcmp(slinkval, group_name)); HDfree(slinkval); } /* end if */ @@ -959,7 +959,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_HARD != lnk_info.type"; } - HDassert(H5L_TYPE_HARD == lnk_info.type); + assert(H5L_TYPE_HARD == lnk_info.type); HDmemset(&root_oinfo, 0, sizeof(root_oinfo)); ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC); @@ -978,21 +978,21 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) failure_mssg = "vrfy_ns_grp_d: root_oinfo.token != lnk_info.u.token"; } } - HDassert(ret >= 0); - HDassert(!token_cmp); + assert(ret >= 0); + assert(!token_cmp); } /* end else-if */ else { void *elinkval; const char *file = NULL; const char *path = NULL; - HDassert(2 == (u % 3)); + assert(2 == (u % 3)); if (H5L_TYPE_EXTERNAL != lnk_info.type) { pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5L_TYPE_EXTERNAL != lnk_info.type"; } - HDassert(H5L_TYPE_EXTERNAL == lnk_info.type); + assert(H5L_TYPE_EXTERNAL == lnk_info.type); elinkval = HDmalloc(lnk_info.u.val_size); @@ -1000,14 +1000,14 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: HDmalloc of elinkval failed."; } - HDassert(elinkval); + assert(elinkval); ret = H5Lget_val(gid, linkname, elinkval, lnk_info.u.val_size, H5P_DEFAULT); if (ret < 0) { pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Lget_val failed."; } - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Lunpack_elink_val(elinkval, lnk_info.u.val_size, NULL, &file, &path); if (ret < 0) { @@ -1022,9 +1022,9 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: 0 != HDstrcmp(path, \"/ext\")"; } - HDassert(ret >= 0); - HDassert(0 == HDstrcmp(file, "external.h5")); - HDassert(0 == HDstrcmp(path, "/ext")); + assert(ret >= 0); + assert(0 == HDstrcmp(file, "external.h5")); + assert(0 == HDstrcmp(path, "/ext")); HDfree(elinkval); } /* end else */ @@ -1039,7 +1039,7 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_ns_grp_d: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ns_grp_d() */ @@ -1077,7 +1077,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Fget_access_plist() failed."; } - HDassert(fapl > 0); + assert(fapl > 0); } if (pass) { /* get low and high bounds from fapl */ @@ -1086,7 +1086,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1)."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { /* turn file format latest off */ @@ -1096,7 +1096,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; } - HDassert(ret >= 0); + assert(ret >= 0); } } @@ -1106,7 +1106,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Gcreate2() failed."; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -1116,7 +1116,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { /* restore low and high bounds */ @@ -1126,7 +1126,7 @@ os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; } - HDassert(ret >= 0); + assert(ret >= 0); } } @@ -1166,7 +1166,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: H5Gopen2() failed."; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -1176,7 +1176,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: H5Gget_create_plist() failed."; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -1191,8 +1191,8 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: 0 != crt_order_flags"; } - HDassert(ret >= 0); - HDassert(0 == crt_order_flags); + assert(ret >= 0); + assert(0 == crt_order_flags); } if (pass) { @@ -1202,7 +1202,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1229,11 +1229,11 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: FALSE != grp_info.mounted"; } - HDassert(ret >= 0); - HDassert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type); - HDassert(0 == grp_info.nlinks); - HDassert(0 == grp_info.max_corder); - HDassert(FALSE == grp_info.mounted); + assert(ret >= 0); + assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type); + assert(0 == grp_info.nlinks); + assert(0 == grp_info.max_corder); + assert(FALSE == grp_info.mounted); } if (pass) { @@ -1243,7 +1243,7 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) pass = FALSE; failure_mssg = "vrfy_os_grp_0: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_os_grp_0() */ @@ -1282,7 +1282,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_n: H5Fget_access_plist() failed."; } - HDassert(fapl > 0); + assert(fapl > 0); } if (pass) { /* get low and high bounds from fapl */ @@ -1291,7 +1291,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1)."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { /* turn file format latest off */ @@ -1301,7 +1301,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1)."; } - HDassert(ret >= 0); + assert(ret >= 0); } } @@ -1311,10 +1311,10 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_n: H5Gcreate2() failed."; } - HDassert(gid > 0); + assert(gid > 0); } - HDassert(nlinks > 0); + assert(nlinks > 0); u = 0; while ((pass) && (u < nlinks)) { @@ -1328,17 +1328,17 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_n: H5Lcreate_soft() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end if */ else { - HDassert(1 == (u % 2)); + assert(1 == (u % 2)); ret = H5Lcreate_hard(fid, "/", gid, linkname, H5P_DEFAULT, H5P_DEFAULT); if (ret < 0) { pass = FALSE; failure_mssg = "os_grp_n: H5Lcreate_hard() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end else */ u++; @@ -1351,7 +1351,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_n: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { /* restore low and high bounds */ @@ -1361,7 +1361,7 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2)."; } - HDassert(ret >= 0); + assert(ret >= 0); } } @@ -1402,7 +1402,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5Gopen2() failed"; } - HDassert(gid > 0); + assert(gid > 0); } if (pass) { @@ -1412,7 +1412,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5Gget_create_plist() failed"; } - HDassert(gcpl > 0); + assert(gcpl > 0); } if (pass) { @@ -1426,8 +1426,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: 0 != crt_order_flags"; } - HDassert(ret >= 0); - HDassert(0 == crt_order_flags); + assert(ret >= 0); + assert(0 == crt_order_flags); } if (pass) { @@ -1437,7 +1437,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5Pclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1465,11 +1465,11 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: FALSE != grp_info.mounted"; } - HDassert(ret >= 0); - HDassert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type); - HDassert(nlinks == grp_info.nlinks); - HDassert(0 == grp_info.max_corder); - HDassert(FALSE == grp_info.mounted); + assert(ret >= 0); + assert(H5G_STORAGE_TYPE_SYMBOL_TABLE == grp_info.storage_type); + assert(nlinks == grp_info.nlinks); + assert(0 == grp_info.max_corder); + assert(FALSE == grp_info.mounted); } u = 0; @@ -1485,7 +1485,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5Lexists() failed"; } - HDassert(link_exists >= 0); + assert(link_exists >= 0); HDmemset(&lnk_info, 0, sizeof(grp_info)); ret = H5Lget_info2(gid, linkname, &lnk_info, H5P_DEFAULT); @@ -1502,9 +1502,9 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5T_CSET_ASCII != lnk_info.cset"; } - HDassert(ret >= 0); - HDassert(FALSE == lnk_info.corder_valid); - HDassert(H5T_CSET_ASCII == lnk_info.cset); + assert(ret >= 0); + assert(FALSE == lnk_info.corder_valid); + assert(H5T_CSET_ASCII == lnk_info.cset); if (0 == (u % 2)) { char *slinkval; @@ -1517,8 +1517,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: (HDstrlen(group_name) + 1) != lnk_info.u.val_size"; } - HDassert(H5L_TYPE_SOFT == lnk_info.type); - HDassert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); + assert(H5L_TYPE_SOFT == lnk_info.type); + assert((HDstrlen(group_name) + 1) == lnk_info.u.val_size); slinkval = (char *)HDmalloc(lnk_info.u.val_size); @@ -1526,7 +1526,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: HDmalloc of slinkval failed"; } - HDassert(slinkval); + assert(slinkval); ret = H5Lget_val(gid, linkname, slinkval, lnk_info.u.val_size, H5P_DEFAULT); @@ -1538,8 +1538,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: 0 != HDstrcmp(slinkval, group_name)"; } - HDassert(ret >= 0); - HDassert(0 == HDstrcmp(slinkval, group_name)); + assert(ret >= 0); + assert(0 == HDstrcmp(slinkval, group_name)); HDfree(slinkval); } /* end if */ @@ -1547,13 +1547,13 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) H5O_info2_t root_oinfo; int token_cmp = 0; - HDassert(1 == (u % 2)); + assert(1 == (u % 2)); if (H5L_TYPE_HARD != lnk_info.type) { pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5L_TYPE_HARD != lnk_info.type"; } - HDassert(H5L_TYPE_HARD == lnk_info.type); + assert(H5L_TYPE_HARD == lnk_info.type); HDmemset(&root_oinfo, 0, sizeof(root_oinfo)); ret = H5Oget_info3(fid, &root_oinfo, H5O_INFO_BASIC); @@ -1573,8 +1573,8 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) failure_mssg = "vrfy_os_grp_n: root_oinfo.token != lnk_info.u.token"; } } - HDassert(ret >= 0); - HDassert(!token_cmp); + assert(ret >= 0); + assert(!token_cmp); } /* end else */ u++; @@ -1587,7 +1587,7 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) pass = FALSE; failure_mssg = "vrfy_os_grp_n: H5Gclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_os_grp_n() */ @@ -1628,7 +1628,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: H5Screate_simple() failed"; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -1638,7 +1638,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: H5Dcreate2() failed"; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -1648,7 +1648,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: H5Sclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -1658,7 +1658,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: HDmalloc of wdata failed."; } - HDassert(wdata); + assert(wdata); } if ((pass) && (write_data)) { @@ -1671,7 +1671,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: H5Dwrite() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } HDfree(wdata); @@ -1683,7 +1683,7 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_i: H5Dclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ds_ctg_i */ @@ -1729,7 +1729,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dopen2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -1739,7 +1739,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dget_space() failed."; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -1749,7 +1749,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: 1 != ndims"; } - HDassert(1 == ndims); + assert(1 == ndims); } if (pass) { @@ -1767,9 +1767,9 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: DSET_DIMS != max_dims[0]"; } - HDassert(ret >= 0); - HDassert(DSET_DIMS == dims[0]); - HDassert(DSET_DIMS == max_dims[0]); + assert(ret >= 0); + assert(DSET_DIMS == dims[0]); + assert(DSET_DIMS == max_dims[0]); } if (pass) { @@ -1779,7 +1779,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1789,7 +1789,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dget_type() failed."; } - HDassert(tid > 0); + assert(tid > 0); } if (pass) { @@ -1799,7 +1799,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: type not H5T_NATIVE_INT"; } - HDassert(1 == type_equal); + assert(1 == type_equal); } if (pass) { @@ -1809,7 +1809,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1827,9 +1827,9 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED"; } - HDassert(ret >= 0); - HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || - (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); + assert(ret >= 0); + assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || + (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); } if (pass) { @@ -1839,7 +1839,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dget_create_plist() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -1849,7 +1849,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5D_CONTIGUOUS != layout"; } - HDassert(H5D_CONTIGUOUS == layout); + assert(H5D_CONTIGUOUS == layout); } if (pass) { @@ -1859,7 +1859,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -1869,7 +1869,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: HDmalloc of rdata failed."; } - HDassert(rdata); + assert(rdata); } if ((pass) && (write_data)) { @@ -1878,7 +1878,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dread() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -1888,7 +1888,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) failure_mssg = "vrfy_ds_ctg_i: u != rdata[u]."; break; } - HDassert((int)u == rdata[u]); + assert((int)u == rdata[u]); } } /* end if */ @@ -1901,7 +1901,7 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_i: H5Dclose() failed"; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ds_ctg_i() */ @@ -1944,7 +1944,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Screate_simple() failed."; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -1954,7 +1954,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Pcreate() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -1964,7 +1964,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Pset_chunk() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1974,7 +1974,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Dcreate2() failed"; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -1984,7 +1984,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -1994,7 +1994,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2004,7 +2004,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: HDmalloc of wdata failed."; } - HDassert(wdata); + assert(wdata); } if ((pass) && (write_data)) { @@ -2016,7 +2016,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Dwrite() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); HDfree(wdata); } /* end if */ @@ -2027,7 +2027,7 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_chk_i: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ds_chk_i */ @@ -2073,7 +2073,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dopen2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -2083,7 +2083,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dget_space() failed."; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -2093,7 +2093,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: 1 != ndims"; } - HDassert(1 == ndims); + assert(1 == ndims); } if (pass) { @@ -2111,9 +2111,9 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: DSET_DIMS != max_dims[0]"; } - HDassert(ret >= 0); - HDassert(DSET_DIMS == dims[0]); - HDassert(DSET_DIMS == max_dims[0]); + assert(ret >= 0); + assert(DSET_DIMS == dims[0]); + assert(DSET_DIMS == max_dims[0]); } if (pass) { @@ -2123,7 +2123,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2133,7 +2133,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dget_type() failed."; } - HDassert(tid > 0); + assert(tid > 0); } if (pass) { @@ -2143,7 +2143,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: tid != H5T_NATIVE_INT"; } - HDassert(1 == type_equal); + assert(1 == type_equal); } if (pass) { @@ -2153,7 +2153,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2171,9 +2171,9 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED"; } - HDassert(ret >= 0); - HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || - (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); + assert(ret >= 0); + assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || + (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); } if (pass) { @@ -2183,7 +2183,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dget_create_plist() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -2193,7 +2193,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5D_CHUNKED != layout"; } - HDassert(H5D_CHUNKED == layout); + assert(H5D_CHUNKED == layout); } if (pass) { @@ -2207,8 +2207,8 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: "; } - HDassert(ret >= 0); - HDassert(DSET_CHUNK_DIMS == chunk_dims[0]); + assert(ret >= 0); + assert(DSET_CHUNK_DIMS == chunk_dims[0]); } if (pass) { @@ -2218,7 +2218,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2228,7 +2228,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: HDmalloc of rdata failed."; } - HDassert(rdata); + assert(rdata); } if ((pass) && (write_data)) { @@ -2237,7 +2237,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dread() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2247,7 +2247,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) failure_mssg = "vrfy_ds_chk_i: u != rdata[u]"; break; } - HDassert((int)u == rdata[u]); + assert((int)u == rdata[u]); } } /* end if */ @@ -2260,7 +2260,7 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_chk_i: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ds_chk_i() */ @@ -2302,7 +2302,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Screate_simple() failed."; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -2312,7 +2312,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Pcreate() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -2322,7 +2322,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Pset_layout() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2332,7 +2332,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Dcreate2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -2342,7 +2342,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2352,7 +2352,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2362,7 +2362,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: HDmalloc of wdata failed."; } - HDassert(wdata); + assert(wdata); } if ((pass) && (write_data)) { @@ -2375,7 +2375,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Dwrite() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); HDfree(wdata); } /* end if */ @@ -2387,7 +2387,7 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_cpt_i: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ds_cpt_i() */ @@ -2433,7 +2433,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dopen2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -2443,7 +2443,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dget_space() failed."; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -2453,7 +2453,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: 1 != ndims"; } - HDassert(1 == ndims); + assert(1 == ndims); } if (pass) { @@ -2471,9 +2471,9 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: DSET_COMPACT_DIMS != max_dims[0]"; } - HDassert(ret >= 0); - HDassert(DSET_COMPACT_DIMS == dims[0]); - HDassert(DSET_COMPACT_DIMS == max_dims[0]); + assert(ret >= 0); + assert(DSET_COMPACT_DIMS == dims[0]); + assert(DSET_COMPACT_DIMS == max_dims[0]); } if (pass) { @@ -2483,7 +2483,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2493,7 +2493,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dget_type() failed."; } - HDassert(tid > 0); + assert(tid > 0); } if (pass) { @@ -2503,7 +2503,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: type != H5T_NATIVE_INT"; } - HDassert(1 == type_equal); + assert(1 == type_equal); } if (pass) { @@ -2513,7 +2513,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2527,8 +2527,8 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5D_SPACE_STATUS_ALLOCATED != allocation"; } - HDassert(ret >= 0); - HDassert(H5D_SPACE_STATUS_ALLOCATED == allocation); + assert(ret >= 0); + assert(H5D_SPACE_STATUS_ALLOCATED == allocation); } if (pass) { @@ -2538,7 +2538,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dget_create_plist() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -2548,7 +2548,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5D_COMPACT != layout"; } - HDassert(H5D_COMPACT == layout); + assert(H5D_COMPACT == layout); } if (pass) { @@ -2558,7 +2558,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2568,7 +2568,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: HDmalloc of rdata failed."; } - HDassert(rdata); + assert(rdata); } if ((pass) && (write_data)) { @@ -2577,7 +2577,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dread() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2587,7 +2587,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) failure_mssg = "vrfy_ds_cpt_i: (int)u != rdata[u]"; break; } - HDassert((int)u == rdata[u]); + assert((int)u == rdata[u]); } } /* end if */ @@ -2600,7 +2600,7 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_cpt_i: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ds_cpt_i() */ @@ -2642,7 +2642,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Screate_simple"; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -2652,7 +2652,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Tvlen_create() failed."; } - HDassert(tid > 0); + assert(tid > 0); } if (pass) { @@ -2662,7 +2662,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Dcreate2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if ((pass) && (write_data)) { @@ -2672,7 +2672,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: HDmalloc of wdata failed."; } - HDassert(wdata); + assert(wdata); } if ((pass) && (write_data)) { @@ -2689,7 +2689,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) failure_mssg = "ds_ctg_v: HDmalloc of tdata failed."; break; } - HDassert(tdata); + assert(tdata); for (v = 0; v < len; v++) tdata[v] = (int)(u + v); @@ -2706,7 +2706,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Dwrite() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2716,7 +2716,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Treclaim() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); HDfree(wdata); } /* end if */ @@ -2728,7 +2728,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2738,7 +2738,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2748,7 +2748,7 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "ds_ctg_v: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* ds_ctg_v() */ @@ -2795,7 +2795,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dopen2() failed."; } - HDassert(dsid > 0); + assert(dsid > 0); } if (pass) { @@ -2805,7 +2805,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dget_space() failed"; } - HDassert(sid > 0); + assert(sid > 0); } if (pass) { @@ -2815,7 +2815,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: 1 != ndims"; } - HDassert(1 == ndims); + assert(1 == ndims); } if (pass) { @@ -2833,9 +2833,9 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: DSET_SMALL_DIMS != max_dims[0]"; } - HDassert(ret >= 0); - HDassert(DSET_SMALL_DIMS == dims[0]); - HDassert(DSET_SMALL_DIMS == max_dims[0]); + assert(ret >= 0); + assert(DSET_SMALL_DIMS == dims[0]); + assert(DSET_SMALL_DIMS == max_dims[0]); } if (pass) { @@ -2845,7 +2845,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dget_type() failed."; } - HDassert(tid > 0); + assert(tid > 0); } if (pass) { @@ -2855,7 +2855,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Tvlen_create() failed."; } - HDassert(tmp_tid > 0); + assert(tmp_tid > 0); } if (pass) { @@ -2865,7 +2865,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: type != vlen H5T_NATIVE_INT"; } - HDassert(1 == type_equal); + assert(1 == type_equal); } if (pass) { @@ -2875,7 +2875,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -2893,9 +2893,9 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: !write_data && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED"; } - HDassert(ret >= 0); - HDassert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || - (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); + assert(ret >= 0); + assert((write_data && allocation == H5D_SPACE_STATUS_ALLOCATED) || + (!write_data && allocation == H5D_SPACE_STATUS_NOT_ALLOCATED)); } if (pass) { @@ -2905,7 +2905,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dget_create_plist() failed."; } - HDassert(dcpl > 0); + assert(dcpl > 0); } if (pass) { @@ -2915,7 +2915,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5D_CONTIGUOUS != layout"; } - HDassert(H5D_CONTIGUOUS == layout); + assert(H5D_CONTIGUOUS == layout); } if (pass) { @@ -2925,7 +2925,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Pclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2935,7 +2935,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: HDmalloc of rdata failed."; } - HDassert(rdata); + assert(rdata); } if ((pass) && (write_data)) { @@ -2945,7 +2945,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dread() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if ((pass) && (write_data)) { @@ -2967,8 +2967,8 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) failure_mssg = "vrfy_ds_ctg_v: (int)(u + v) != tdata[v]"; break; } - HDassert(tdata); - HDassert((int)(u + v) == tdata[v]); + assert(tdata); + assert((int)(u + v) == tdata[v]); } /* end for */ } /* end for */ } @@ -2980,7 +2980,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Treclaim() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } /* end if */ HDfree(rdata); @@ -2992,7 +2992,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Sclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -3002,7 +3002,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Tclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } if (pass) { @@ -3012,7 +3012,7 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) pass = FALSE; failure_mssg = "vrfy_ds_ctg_v: H5Dclose() failed."; } - HDassert(ret >= 0); + assert(ret >= 0); } } /* vrfy_ds_ctg_v() */ @@ -3051,31 +3051,31 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) { char full_path[1024]; - HDassert(base_path); + assert(base_path); /* Add & verify an empty "new style" group */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ns_grp_0(fid, full_path); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_0(fid, full_path); } /* Add & verify a compact "new style" group (3 link messages) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ns_grp_c(fid, full_path, 3); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_c(fid, full_path, 3); } @@ -3084,26 +3084,26 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ns_grp_d(fid, full_path, 300); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_d(fid, full_path, 300); } /* Add & verify an empty "old style" group to file */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); os_grp_0(fid, full_path); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_os_grp_0(fid, full_path); } @@ -3112,13 +3112,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); os_grp_n(fid, full_path, proc_num, 300); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_os_grp_n(fid, full_path, proc_num, 300); } @@ -3127,13 +3127,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_ctg_i(fid, full_path, FALSE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, FALSE); } @@ -3142,13 +3142,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_ctg_i(fid, full_path, TRUE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, TRUE); } @@ -3157,13 +3157,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_chk_i(fid, full_path, FALSE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, FALSE); } @@ -3172,13 +3172,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_chk_i(fid, full_path, TRUE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, TRUE); } @@ -3187,13 +3187,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_cpt_i(fid, full_path, FALSE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, FALSE); } @@ -3202,13 +3202,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_cpt_i(fid, full_path, TRUE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, TRUE); } @@ -3217,13 +3217,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_ctg_v(fid, full_path, FALSE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, FALSE); } @@ -3232,13 +3232,13 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); ds_ctg_v(fid, full_path, TRUE); } if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, TRUE); } @@ -3276,19 +3276,19 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) { char full_path[1024]; - HDassert(base_path); + assert(base_path); /* validate an empty "new style" group */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/A", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_0(fid, full_path); } /* validate a compact "new style" group (3 link messages) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/B", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_c(fid, full_path, 3); } @@ -3297,14 +3297,14 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/C", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ns_grp_d(fid, full_path, 300); } /* validate an empty "old style" group in file */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/D", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_os_grp_0(fid, full_path); } @@ -3313,7 +3313,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/E", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_os_grp_n(fid, full_path, proc_num, 300); } @@ -3322,7 +3322,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/F", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, FALSE); } @@ -3331,7 +3331,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/G", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_i(fid, full_path, TRUE); } @@ -3340,7 +3340,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/H", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, FALSE); } @@ -3349,7 +3349,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/I", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_chk_i(fid, full_path, TRUE); } @@ -3358,7 +3358,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/J", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, FALSE); } @@ -3367,7 +3367,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/K", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_cpt_i(fid, full_path, TRUE); } @@ -3376,7 +3376,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/L", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, FALSE); } @@ -3385,7 +3385,7 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) */ if (pass) { HDsnprintf(full_path, sizeof(full_path), "%s/M", base_path); - HDassert(HDstrlen(full_path) < 1024); + assert(HDstrlen(full_path) < 1024); vrfy_ds_ctg_v(fid, full_path, TRUE); } diff --git a/test/gheap.c b/test/gheap.c index f8766df..cca5289 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -517,8 +517,8 @@ test_ooo_indices(hid_t fapl) } /* The indices should have "wrapped around" on the last iteration */ - HDassert(obj[534].idx == 65535); - HDassert(obj[535].idx == 1); + assert(obj[534].idx == 65535); + assert(obj[535].idx == 1); /* Reopen the file */ if (H5Fclose(file) < 0) diff --git a/test/h5test.c b/test/h5test.c index 7e36315..7011121 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -314,7 +314,7 @@ void h5_restore_err(void) { /* Restore the original error reporting routine */ - HDassert(err_func != NULL); + assert(err_func != NULL); H5Eset_auto2(H5E_DEFAULT, err_func, NULL); err_func = NULL; } @@ -335,7 +335,7 @@ h5_reset(void) H5close(); /* Save current error stack reporting routine and redirect to our local one */ - HDassert(err_func == NULL); + assert(err_func == NULL); H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); } @@ -365,7 +365,7 @@ h5_test_init(void) H5close(); /* Save current error stack reporting routine and redirect to our local one */ - HDassert(err_func == NULL); + assert(err_func == NULL); H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); } /* end h5_test_init() */ @@ -1178,7 +1178,7 @@ h5_get_file_size(const char *filename, hid_t fapl) } /* end for */ } else { - HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); + assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES); for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) { /* Create the filename to query */ HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]); @@ -1358,7 +1358,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) int len; static char *env = NULL; - HDassert(name); + assert(name); MPI_Initialized(&mpi_initialized); MPI_Finalized(&mpi_finalized); @@ -1366,7 +1366,7 @@ getenv_all(MPI_Comm comm, int root, const char *name) if (mpi_initialized && !mpi_finalized) { MPI_Comm_rank(comm, &mpi_rank); MPI_Comm_size(comm, &mpi_size); - HDassert(root < mpi_size); + assert(root < mpi_size); /* The root task does the getenv call * and sends the result to the other tasks */ @@ -1599,16 +1599,16 @@ h5_send_message(const char *send, const char *arg1, const char *arg2) /* Write messages to signal file, if provided */ if (arg2 != NULL) { - HDassert(arg1); + assert(arg1); HDfprintf(signalfile, "%s\n%s\n", arg1, arg2); } /* end if */ else if (arg1 != NULL) { - HDassert(arg2 == NULL); + assert(arg2 == NULL); HDfprintf(signalfile, "%s\n", arg1); } /* end if */ else { - HDassert(arg1 == NULL); - HDassert(arg2 == NULL); + assert(arg1 == NULL); + assert(arg2 == NULL); } /* end else */ HDfclose(signalfile); @@ -2162,7 +2162,7 @@ h5_using_default_driver(const char *drv_name) { hbool_t ret_val = TRUE; - HDassert(H5_DEFAULT_VFD == H5FD_SEC2); + assert(H5_DEFAULT_VFD == H5FD_SEC2); if (!drv_name) drv_name = HDgetenv(HDF5_DRIVER); @@ -2194,8 +2194,8 @@ h5_using_parallel_driver(hid_t fapl_id, hbool_t *driver_is_parallel) hid_t driver_id = H5I_INVALID_HID; herr_t ret_value = SUCCEED; - HDassert(fapl_id >= 0); - HDassert(driver_is_parallel); + assert(fapl_id >= 0); + assert(driver_is_parallel); if (fapl_id == H5P_DEFAULT) fapl_id = H5P_FILE_ACCESS_DEFAULT; @@ -2237,8 +2237,8 @@ h5_driver_is_default_vfd_compatible(hid_t fapl_id, hbool_t *default_vfd_compatib hid_t driver_id = H5I_INVALID_HID; herr_t ret_value = SUCCEED; - HDassert(fapl_id >= 0); - HDassert(default_vfd_compatible); + assert(fapl_id >= 0); + assert(default_vfd_compatible); if (fapl_id == H5P_DEFAULT) fapl_id = H5P_FILE_ACCESS_DEFAULT; diff --git a/test/links.c b/test/links.c index b865275..fcafbf8 100644 --- a/test/links.c +++ b/test/links.c @@ -955,7 +955,7 @@ toomany(hid_t fapl, hbool_t new_format) /* XXX: should probably make a "generic" test that creates the proper * # of links based on this value - QAK */ - HDassert(H5L_NUM_LINKS == 16); + assert(H5L_NUM_LINKS == 16); /* Create file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); @@ -4148,7 +4148,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format) /* XXX: should probably make a "generic" test that creates the proper * # of links based on this value - QAK */ - HDassert(H5L_NUM_LINKS == 16); + assert(H5L_NUM_LINKS == 16); /* Create file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); @@ -6349,7 +6349,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -6384,7 +6384,7 @@ link_iterate_check_deprec(hid_t group_id, H5_index_t idx_type, H5_iter_order_t o else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -6510,7 +6510,7 @@ link_iterate_deprec(hid_t fapl) "creation order index using deprecated routines"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("iterating over links by creation order index in native order w/creation " "order index using deprecated routines"); @@ -6537,7 +6537,7 @@ link_iterate_deprec(hid_t fapl) "order index using deprecated routines"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("iterating over links by name index in native order w/creation order " "index using deprecated routines"); @@ -6832,7 +6832,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -6867,7 +6867,7 @@ link_iterate_old_check_deprec(hid_t group_id, H5_iter_order_t order, unsigned ma else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -6980,7 +6980,7 @@ link_iterate_old_deprec(hid_t fapl) "deprecated routines"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); TESTING("iterating over links by name index in native order in old-style group using deprecated " "routines"); } /* end else */ @@ -7986,7 +7986,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format) /* XXX: should probably make a "generic" test that creates the proper * # of links based on this value - QAK */ - HDassert(H5L_NUM_LINKS == 16); + assert(H5L_NUM_LINKS == 16); /* Set up filenames */ h5_fixname(FILENAME[3], fapl, filename1, sizeof filename1); @@ -15244,7 +15244,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) /* XXX: should probably make a "generic" test that creates the proper * # of links based on this value - QAK */ - HDassert(H5L_NUM_LINKS == 16); + assert(H5L_NUM_LINKS == 16); /* Create file */ h5_fixname(FILENAME[1], fapl, filename, sizeof filename); @@ -19534,7 +19534,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -19570,7 +19570,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order, u else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -19699,7 +19699,7 @@ link_iterate(hid_t fapl) "creation order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("iterating over links by creation order index in native order w/creation " "order index"); @@ -19726,7 +19726,7 @@ link_iterate(hid_t fapl) "order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING( "iterating over links by name index in native order w/creation order index"); @@ -20031,7 +20031,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -20067,7 +20067,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, unsigned max_links else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_links; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -20183,7 +20183,7 @@ link_iterate_old(hid_t fapl) TESTING("iterating over links by name index in decreasing order in old-style group"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); TESTING("iterating over links by name index in native order in old-style group"); } /* end else */ @@ -20461,7 +20461,7 @@ open_by_idx(hid_t fapl) "order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING( "open object by creation order index in native order w/creation order index"); @@ -20484,7 +20484,7 @@ open_by_idx(hid_t fapl) TESTING("open object by name index in decreasing order w/o creation order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("open object by name index in native order w/creation order index"); else @@ -20810,7 +20810,7 @@ open_by_idx_old(hid_t fapl) TESTING("open object by name index in decreasing order in old-style group"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); TESTING("open object by name index in native order in old-style group"); } /* end else */ @@ -21078,7 +21078,7 @@ object_info(hid_t fapl) "creation order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("query object info by creation order index in native order w/creation " "order index"); @@ -21105,7 +21105,7 @@ object_info(hid_t fapl) "index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("query object info by name index in native order w/creation order index"); else @@ -21435,7 +21435,7 @@ object_info_old(hid_t fapl) TESTING("query object info by name index in decreasing order in old-style group"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); TESTING("query object info by name index in native order in old-style group"); } /* end else */ @@ -21629,7 +21629,7 @@ group_info(hid_t fapl) "creation order index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("query group info by creation order index in native order w/creation " "order index"); @@ -21656,7 +21656,7 @@ group_info(hid_t fapl) "index"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); if (use_index) TESTING("query group info by name index in native order w/creation order index"); else @@ -22149,7 +22149,7 @@ group_info_old(hid_t fapl) TESTING("query group info by name index in decreasing order in old-style group"); } /* end else */ else { - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); TESTING("query group info by name index in native order in old-style group"); } /* end else */ @@ -159,8 +159,8 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state) { H5FS_stat_t frspace_stats; /* Statistics about the heap */ - HDassert(f); - HDassert(frsp); + assert(f); + assert(frsp); /* Get statistics for free-space and verify they are correct */ if (H5FS_stat_info(f, frsp, &frspace_stats) < 0) @@ -7756,7 +7756,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split) hbool_t relax; H5FD_mem_t mt; - HDassert(is_multi_or_split); + assert(is_multi_or_split); HDmemset(memb_name, 0, sizeof memb_name); diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index 8a1328f..bd38d8c 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -1359,9 +1359,9 @@ create_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset) hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM}; hsize_t dset_dims[2] = {DSET_DIM, DSET_DIM}; - HDassert(file_id >= 0); - HDassert(min_dset <= max_dset); - HDassert(max_dset <= MAX_DSET_COUNT); + assert(file_id >= 0); + assert(min_dset <= max_dset); + assert(max_dset <= MAX_DSET_COUNT); LOGPRINT(2, "create_dataset()\n"); @@ -1678,9 +1678,9 @@ verify_datasets(hid_t file_id, unsigned min_dset, unsigned max_dset) hid_t memspace_id = H5I_INVALID_HID; hsize_t chunk_dims[2] = {CHUNK_DIM, CHUNK_DIM}; - HDassert(file_id >= 0); - HDassert(min_dset <= max_dset); - HDassert(max_dset <= MAX_DSET_COUNT); + assert(file_id >= 0); + assert(min_dset <= max_dset); + assert(max_dset <= MAX_DSET_COUNT); LOGPRINT(2, "verify_datasets()\n"); diff --git a/test/objcopy.c b/test/objcopy.c index 187b04a..f1c4636 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -1098,7 +1098,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else { /* vlens cannot currently be nested below the top layer of a * compound */ - HDassert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); + assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { @@ -1675,7 +1675,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) break; case H5O_TYPE_MAP: - HDassert(0 && "maps not supported in native VOL connector"); + assert(0 && "maps not supported in native VOL connector"); /* clang complains about implicit fallthrough here and * our usual attributes and fall-through comments don't @@ -1685,7 +1685,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - HDassert(0 && "Unknown type of object"); + assert(0 && "Unknown type of object"); break; H5_CLANG_DIAG_ON("implicit-fallthrough") } /* end switch */ @@ -1708,7 +1708,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) char linkval2[NAME_BUF_SIZE]; /* Link value */ /* Get link values */ - HDassert(linfo.u.val_size <= NAME_BUF_SIZE); + assert(linfo.u.val_size <= NAME_BUF_SIZE); if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR; if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) @@ -1719,7 +1719,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) TEST_ERROR; } /* end else-if */ else { - HDassert(0 && "Unknown type of link"); + assert(0 && "Unknown type of link"); } /* end else */ } /* end else */ } /* end for */ diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index 73c611e..826ba9f 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -882,7 +882,7 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, else { /* vlens cannot currently be nested below the top layer of a * compound */ - HDassert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); + assert(H5Tdetect_class(memb_id, H5T_VLEN) == FALSE); /* Iterate over all elements, calling memcmp() for each */ for (elmt = 0; elmt < nelmts; elmt++) { @@ -1387,7 +1387,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) break; case H5O_TYPE_MAP: - HDassert(0 && "maps not supported in native VOL connector"); + assert(0 && "maps not supported in native VOL connector"); /* clang complains about implicit fallthrough here and * our usual attributes and fall-through comments don't @@ -1397,7 +1397,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) case H5O_TYPE_UNKNOWN: case H5O_TYPE_NTYPES: default: - HDassert(0 && "Unknown type of object"); + assert(0 && "Unknown type of object"); break; H5_CLANG_DIAG_ON("implicit-fallthrough") } /* end switch */ @@ -1420,7 +1420,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) char linkval2[NAME_BUF_SIZE]; /* Link value */ /* Get link values */ - HDassert(linfo.u.val_size <= NAME_BUF_SIZE); + assert(linfo.u.val_size <= NAME_BUF_SIZE); if (H5Lget_val(gid, objname, linkval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR; if (H5Lget_val(gid2, objname2, linkval2, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) @@ -1431,7 +1431,7 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) TEST_ERROR; } /* end else-if */ else { - HDassert(0 && "Unknown type of link"); + assert(0 && "Unknown type of link"); } /* end else */ } /* end else */ } /* end for */ diff --git a/test/onion.c b/test/onion.c index da1eb12..20522bd 100644 --- a/test/onion.c +++ b/test/onion.c @@ -1680,7 +1680,7 @@ verify_history_as_expected_onion(H5FD_t *raw_file, struct expected_history *filt TEST_ERROR; /* Re-use buffer space to sanity-check checksum for record pointer(s). */ - HDassert(readsize >= sizeof(H5FD_onion_record_loc_t)); + assert(readsize >= sizeof(H5FD_onion_record_loc_t)); for (size_t i = 0; i < history_out.n_revisions; i++) { uint64_t phys_addr; diff --git a/test/page_buffer.c b/test/page_buffer.c index 16fcfd5..2f4e607 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -1121,9 +1121,9 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) /* opening the file inserts one or more pages into the page buffer. * Get the raw and meta counts now, so we can adjust tests accordingly. */ - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->page_buf); + assert(f); + assert(f->shared); + assert(f->shared->page_buf); base_raw_cnt = f->shared->page_buf->raw_count; base_meta_cnt = f->shared->page_buf->meta_count; @@ -1255,9 +1255,9 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) /* opening the file inserts one or more pages into the page buffer. * Get the raw and meta counts now, so we can adjust tests accordingly. */ - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->page_buf); + assert(f); + assert(f->shared); + assert(f->shared->page_buf); base_raw_cnt = f->shared->page_buf->raw_count; base_meta_cnt = f->shared->page_buf->meta_count; @@ -1738,9 +1738,9 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) * Get the raw and meta counts now, so we can adjust the expected * statistics accordingly. */ - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->page_buf); + assert(f); + assert(f->shared); + assert(f->shared->page_buf); base_raw_cnt = f->shared->page_buf->raw_count; base_meta_cnt = f->shared->page_buf->meta_count; diff --git a/test/s3comms.c b/test/s3comms.c index 330360e..7cf3057 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -535,7 +535,7 @@ test_aws_canonical_request(void) /* create HTTP request object with given verb, resource/path */ hrb = H5FD_s3comms_hrb_init_request(C->verb, C->resource, "HTTP/1.1"); - HDassert(hrb->body == NULL); + assert(hrb->body == NULL); /* Create headers list from test case input */ @@ -557,9 +557,9 @@ test_aws_canonical_request(void) while (node != NULL) { FAIL_IF(FAIL == H5FD_s3comms_hrb_node_set(&node, node->name, NULL)); } - HDassert(NULL == node); + assert(NULL == node); FAIL_IF(FAIL == H5FD_s3comms_hrb_destroy(&hrb)); - HDassert(NULL == hrb); + assert(NULL == hrb); } /* for each test case */ @@ -580,7 +580,7 @@ test_aws_canonical_request(void) "signed headers destination cannot be null") FAIL_IF(FAIL == H5FD_s3comms_hrb_destroy(&hrb)) - HDassert(NULL == hrb); + assert(NULL == hrb); PASSED(); return 0; @@ -590,7 +590,7 @@ error: if (node != NULL) { while (node != NULL) (void)H5FD_s3comms_hrb_node_set(&node, node->name, NULL); - HDassert(node == NULL); + assert(node == NULL); } if (hrb != NULL) { (void)H5FD_s3comms_hrb_destroy(&hrb); @@ -1272,7 +1272,7 @@ test_HMAC_SHA256(void) } else { dest = (char *)HDmalloc(sizeof(char) * cases[i].dest_size); - HDassert(dest != NULL); + assert(dest != NULL); } JSVERIFY( @@ -1285,7 +1285,7 @@ test_HMAC_SHA256(void) /* print out how wrong things are, and then fail */ dest = (char *)HDrealloc(dest, cases[i].dest_size + 1); - HDassert(dest != NULL); + assert(dest != NULL); dest[cases[i].dest_size] = 0; HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest); TEST_ERROR; @@ -1606,7 +1606,7 @@ test_parse_url(void) *********/ for (i = 0; i < ncases; i++) { - HDassert(purl == NULL); + assert(purl == NULL); JSVERIFY(cases[i].exp_ret, H5FD_s3comms_parse_url(cases[i].url, &purl), cases[i].msg) @@ -2217,7 +2217,7 @@ test_signing_key(void) for (i = 0; i < ncases; i++) { key = (unsigned char *)HDmalloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH); - HDassert(key != NULL); + assert(key != NULL); JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when), NULL) @@ -2234,7 +2234,7 @@ test_signing_key(void) ***************/ key = (unsigned char *)HDmalloc(sizeof(unsigned char) * SHA256_DIGEST_LENGTH); - HDassert(key != NULL); + assert(key != NULL); JSVERIFY(FAIL, H5FD_s3comms_signing_key(NULL, cases[0].secret_key, cases[0].region, cases[0].when), "destination cannot be NULL") @@ -2396,9 +2396,9 @@ test_trim(void) TESTING("s3comms trim"); for (i = 0; i < n_cases; i++) { - HDassert(str == NULL); + assert(str == NULL); str = (char *)HDmalloc(sizeof(char) * cases[i].in_len); - HDassert(str != NULL); + assert(str != NULL); HDstrncpy(str, cases[i].in, cases[i].in_len); JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL) @@ -2414,9 +2414,9 @@ test_trim(void) "should not fail when trimming a null string"); JSVERIFY(0, dest_len, "trimming NULL string writes 0 characters") - HDassert(str == NULL); + assert(str == NULL); str = (char *)HDmalloc(sizeof(char *) * 11); - HDassert(str != NULL); + assert(str != NULL); HDmemcpy(str, "some text ", 11); /* string with null terminator */ JSVERIFY(FAIL, H5FD_s3comms_trim(NULL, str, 10, &dest_len), "destination for trim cannot be NULL"); HDfree(str); @@ -2529,7 +2529,7 @@ test_uriencode(void) ***************/ dest = (char *)HDmalloc(sizeof(char) * 15); - HDassert(dest != NULL); + assert(dest != NULL); JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, FALSE, &dest_written), "destination cannot be NULL"); diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c index 07f2cb1..4681d4f 100644 --- a/test/swmr_addrem_writer.c +++ b/test/swmr_addrem_writer.c @@ -75,7 +75,7 @@ open_skeleton(const char *filename, unsigned verbose) hsize_t dim[2]; /* Dataspace dimension */ unsigned u, v; /* Local index variable */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -148,7 +148,7 @@ addrem_records(hid_t fid, unsigned verbose, unsigned long nops, unsigned long fl unsigned long op_to_flush; /* # of operations before flush */ unsigned long u, v; /* Local index variables */ - HDassert(fid > 0); + assert(fid > 0); /* Reset the buffer */ HDmemset(&buf, 0, sizeof(buf)); diff --git a/test/swmr_common.c b/test/swmr_common.c index 0c869f1..0143cf8 100644 --- a/test/swmr_common.c +++ b/test/swmr_common.c @@ -179,7 +179,7 @@ create_symbol_datatype(void) int generate_name(char *name_buf, size_t name_buf_length, unsigned level, unsigned count) { - HDassert(name_buf); + assert(name_buf); HDsnprintf(name_buf, name_buf_length, "%u-%04u", level, count); diff --git a/test/swmr_generator.c b/test/swmr_generator.c index 53a619b..d8d4adc 100644 --- a/test/swmr_generator.c +++ b/test/swmr_generator.c @@ -97,8 +97,8 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t swmr_write, int comp #endif /* FILLVAL_WORKS */ unsigned u, v; /* Local index variable */ - HDassert(filename); - HDassert(index_type); + assert(filename); + assert(index_type); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 4c3770b..47a1288 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -86,10 +86,10 @@ check_dataset(hid_t fid, hbool_t verbose, FILE *verbose_file, const char *sym_na hssize_t snpoints; /* Number of elements in dataset */ hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */ - HDassert(fid >= 0); - HDassert(sym_name); - HDassert(record); - HDassert(rec_sid >= 0); + assert(fid >= 0); + assert(sym_name); + assert(record); + assert(rec_sid >= 0); /* Open dataset for symbol */ if ((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0) @@ -204,9 +204,9 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned unsigned v; /* Local index variable */ hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ - HDassert(filename); - HDassert(nseconds != 0); - HDassert(poll_time != 0); + assert(filename); + assert(nseconds != 0); + assert(poll_time != 0); /* Reset the record */ /* (record's 'info' field might need to change for each record read, also) */ diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c index 82c6af6..eca81ad 100644 --- a/test/swmr_remove_reader.c +++ b/test/swmr_remove_reader.c @@ -83,10 +83,10 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor hssize_t snpoints; /* Number of elements in dataset */ hsize_t start[2] = {0, 0}, count[2] = {1, 1}; /* Hyperslab selection values */ - HDassert(fid >= 0); - HDassert(sym_name); - HDassert(record); - HDassert(rec_sid >= 0); + assert(fid >= 0); + assert(sym_name); + assert(record); + assert(rec_sid >= 0); /* Open dataset for symbol */ if ((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0) @@ -199,9 +199,9 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns symbol_t record; /* The record to add to the dataset */ unsigned v; /* Local index variable */ - HDassert(filename); - HDassert(nseconds != 0); - HDassert(poll_time != 0); + assert(filename); + assert(nseconds != 0); + assert(poll_time != 0); /* Reset the record */ /* (record's 'info' field might need to change for each record written, also) */ diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c index da09b2b..d383e54 100644 --- a/test/swmr_remove_writer.c +++ b/test/swmr_remove_writer.c @@ -75,7 +75,7 @@ open_skeleton(const char *filename, unsigned verbose, unsigned old) hsize_t dim[2]; /* Dataspace dimensions */ unsigned u, v; /* Local index variable */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -146,7 +146,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ - HDassert(fid >= 0); + assert(fid >= 0); /* Remove records from random datasets, according to frequency distribution */ shrink_to_flush = flush_count; diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c index cc38fb8..ff55a5b 100644 --- a/test/swmr_sparse_reader.c +++ b/test/swmr_sparse_reader.c @@ -91,10 +91,10 @@ check_dataset(hid_t fid, unsigned verbose, const symbol_info_t *symbol, symbol_t hsize_t start[2] = {0, 0}; /* Hyperslab selection values */ hsize_t count[2] = {1, 1}; /* Hyperslab selection values */ - HDassert(fid >= 0); - HDassert(symbol); - HDassert(record); - HDassert(rec_sid >= 0); + assert(fid >= 0); + assert(symbol); + assert(record); + assert(rec_sid >= 0); /* Open dataset for symbol */ if ((dsid = H5Dopen2(fid, symbol->name, H5P_DEFAULT)) < 0) @@ -182,8 +182,8 @@ read_records(const char *filename, unsigned verbose, unsigned long nrecords, uns unsigned long u; /* Local index variable */ hid_t fapl; - HDassert(filename); - HDassert(poll_time != 0); + assert(filename); + assert(poll_time != 0); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c index 3644d89..e8937e0 100644 --- a/test/swmr_sparse_writer.c +++ b/test/swmr_sparse_writer.c @@ -73,7 +73,7 @@ open_skeleton(const char *filename, unsigned verbose) unsigned seed; /* Seed for random number generator */ unsigned u, v; /* Local index variable */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -153,7 +153,7 @@ add_records(hid_t fid, unsigned verbose, unsigned long nrecords, unsigned long f hsize_t dim[2] = {1, 0}; /* Dataspace dimensions */ unsigned long u, v; /* Local index variables */ - HDassert(fid >= 0); + assert(fid >= 0); /* Reset the record */ /* (record's 'info' field might need to change for each record written, also) */ diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c index cd02457..40014fb 100644 --- a/test/swmr_start_write.c +++ b/test/swmr_start_write.c @@ -71,7 +71,7 @@ create_file(const char *filename, hbool_t verbose, FILE *verbose_file, unsigned hid_t sid; /* Dataspace ID */ hid_t aid; /* Attribute ID */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -145,7 +145,7 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file, hsize_t chunk_dims[2] = {1, CHUNK_SIZE}; /* Chunk dimensions */ unsigned u, v; /* Local index variable */ - HDassert(index_type); + assert(index_type); /* Create datatype for creating datasets */ if ((tid = create_symbol_datatype()) < 0) @@ -219,7 +219,7 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor unsigned long rec_to_flush; /* # of records left to write before flush */ unsigned long u, v; /* Local index variables */ - HDassert(fid >= 0); + assert(fid >= 0); /* Reset the record */ /* (record's 'info' field might need to change for each record written, also) */ diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 5f41215..3b86dea 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -75,7 +75,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, unsigne unsigned u, v; /* Local index variable */ hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ - HDassert(filename); + assert(filename); /* Create file access property list */ if ((fapl = h5_fileaccess()) < 0) @@ -155,7 +155,7 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file, unsigned long nrecor unsigned long rec_to_flush; /* # of records left to write before flush */ unsigned long u, v; /* Local index variables */ - HDassert(fid >= 0); + assert(fid >= 0); /* Reset the record */ /* (record's 'info' field might need to change for each record written, also) */ diff --git a/test/tattr.c b/test/tattr.c index 9151b26..d38aaa7 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -4610,7 +4610,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -4693,7 +4693,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -4814,7 +4814,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -4924,7 +4924,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -5155,7 +5155,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -5209,7 +5209,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create several attributes, but keep storage in compact form */ @@ -5370,7 +5370,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -5564,7 +5564,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -5893,7 +5893,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -6415,7 +6415,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -6487,7 +6487,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete attributes from compact storage */ @@ -6546,7 +6546,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -6619,7 +6619,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete attributes from dense storage */ @@ -6689,7 +6689,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create attributes, to push into dense form */ @@ -6736,7 +6736,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete every other attribute from dense storage, in appropriate order */ @@ -6789,7 +6789,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Delete remaining attributes from dense storage, in appropriate order */ @@ -7078,7 +7078,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7109,7 +7109,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7140,7 +7140,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7172,7 +7172,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id, H5_index_t idx else { unsigned nvisit = 0; /* # of links visited */ - HDassert(order == H5_ITER_NATIVE); + assert(order == H5_ITER_NATIVE); for (v = 0; v < max_attrs; v++) if (iter_info->visited[v] == TRUE) nvisit++; @@ -7405,7 +7405,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -7507,7 +7507,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -7800,7 +7800,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -7878,7 +7878,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -8140,7 +8140,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -8246,7 +8246,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ @@ -8435,7 +8435,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Check on dataset's attribute storage status */ @@ -8498,7 +8498,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl) break; default: - HDassert(0 && "Too many datasets!"); + assert(0 && "Too many datasets!"); } /* end switch */ /* Create more attributes, to push into dense form */ diff --git a/test/tfile.c b/test/tfile.c index 4bb2d82..fca33ab 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -4406,7 +4406,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split) hbool_t relax; H5FD_mem_t mt; - HDassert(split); + assert(split); HDmemset(memb_name, 0, sizeof memb_name); diff --git a/test/th5s.c b/test/th5s.c index 7e9d216..8717e85 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -1772,7 +1772,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1797,7 +1797,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = (uint8_t)(expected_version == 3 ? 4 : 8); break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1822,7 +1822,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } @@ -1847,7 +1847,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } /* end switch */ @@ -1872,7 +1872,7 @@ test_h5s_encode_regular_hyper(H5F_libver_t low, H5F_libver_t high) expected_enc_size = 8; break; default: - HDassert(0); + assert(0); break; } @@ -1966,7 +1966,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } @@ -1995,7 +1995,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) break; default: - HDassert(0); + assert(0); break; } @@ -2008,7 +2008,7 @@ test_h5s_encode_irregular_hyper(H5F_libver_t low, H5F_libver_t high) VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab"); /* Verify the version and encoded size expected for the configuration */ - HDassert(expected_enc_size <= 255); + assert(expected_enc_size <= 255); ret = test_h5s_check_encoding(fapl, sid, expected_version, (uint8_t)expected_enc_size, expected_to_fail); CHECK(ret, FAIL, "test_h5s_check_encoding"); diff --git a/test/trefer_deprec.c b/test/trefer_deprec.c index 0128874..fc3ddcf 100644 --- a/test/trefer_deprec.c +++ b/test/trefer_deprec.c @@ -1426,9 +1426,9 @@ test_reference_group(void) /* Create bottom dataset */ did = H5Dcreate2(gid, DSETNAME2, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - HDassert(did > 0); + assert(did > 0); ret = H5Dclose(did); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Gclose(gid); CHECK(ret, FAIL, "H5Gclose"); diff --git a/test/tselect.c b/test/tselect.c index 8079353..8fc6c65 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -1884,8 +1884,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR size_t s; /* Local index variable */ hbool_t mis_match; /* Flag to indicate mismatch in expected value */ - HDassert(cube_buf); - HDassert(cube_size > 0); + assert(cube_buf); + assert(cube_size > 0); expected_value = 0; mis_match = FALSE; @@ -1902,7 +1902,7 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, size_t H5_ATTR m = 0; do { /* Sanity check */ - HDassert(s < cube_size); + assert(s < cube_size); /* Check for correct value */ if (*cube_ptr != expected_value) @@ -1976,12 +1976,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co MESSAGE(7, ("\tranks = %u/%u, edge_size = %u, chunk_edge_size = %u.\n", small_rank, large_rank, edge_size, chunk_edge_size)); - HDassert(edge_size >= 6); - HDassert(edge_size >= chunk_edge_size); - HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); - HDassert(small_rank > 0); - HDassert(small_rank < large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(edge_size >= chunk_edge_size); + assert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); + assert(small_rank > 0); + assert(small_rank < large_rank); + assert(large_rank <= SS_DR_MAX_RANK); /* Compute cube sizes */ small_cube_size = large_cube_size = (size_t)1; @@ -1992,7 +1992,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co large_cube_size *= (size_t)edge_size; } /* end for */ - HDassert(large_cube_size < (size_t)UINT_MAX); + assert(large_cube_size < (size_t)UINT_MAX); /* set up the start, stride, count, and block pointers */ start_ptr = &(start[SS_DR_MAX_RANK - large_rank]); @@ -2238,8 +2238,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); mis_match = FALSE; ptr_1 = large_cube_buf_1; @@ -2432,8 +2432,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); mis_match = FALSE; ptr_1 = large_cube_buf_1; @@ -2597,16 +2597,16 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, u unsigned u; /* Local index variables */ herr_t ret; /* Generic return value */ - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(0 < sel_rank); - HDassert(sel_rank <= tgt_n_cube_rank); - HDassert(tgt_n_cube_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(0 < sel_rank); + assert(sel_rank <= tgt_n_cube_rank); + assert(tgt_n_cube_rank <= SS_DR_MAX_RANK); sel_offset = SS_DR_MAX_RANK - sel_rank; n_cube_offset = SS_DR_MAX_RANK - tgt_n_cube_rank; - HDassert(n_cube_offset <= sel_offset); + assert(n_cube_offset <= sel_offset); /* First, compute the base count (which assumes start == 0 * for the associated offset) and offset_count (which @@ -2819,13 +2819,13 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t *buf_ptr, unsigned rank unsigned v, w, x, y, z; /* to track position in checker */ const unsigned test_max_rank = 5; /* code changes needed if this is increased */ - HDassert(buf_ptr != NULL); - HDassert(0 < rank); - HDassert(rank <= test_max_rank); - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(test_max_rank <= SS_DR_MAX_RANK); + assert(buf_ptr != NULL); + assert(0 < rank); + assert(rank <= test_max_rank); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(test_max_rank <= SS_DR_MAX_RANK); val_ptr = buf_ptr; expected_value = first_expected_val; @@ -2956,15 +2956,15 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ MESSAGE(7, ("\tranks = %d/%d, edge_size = %d, checker_edge_size = %d, chunk_edge_size = %d.\n", small_rank, large_rank, edge_size, checker_edge_size, chunk_edge_size)); - HDassert(edge_size >= 6); - HDassert(checker_edge_size > 0); - HDassert(checker_edge_size <= edge_size); - HDassert(edge_size >= chunk_edge_size); - HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); - HDassert(small_rank > 0); - HDassert(small_rank < large_rank); - HDassert(large_rank <= test_max_rank); - HDassert(test_max_rank <= SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(checker_edge_size > 0); + assert(checker_edge_size <= edge_size); + assert(edge_size >= chunk_edge_size); + assert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); + assert(small_rank > 0); + assert(small_rank < large_rank); + assert(large_rank <= test_max_rank); + assert(test_max_rank <= SS_DR_MAX_RANK); /* Compute cube sizes */ small_cube_size = large_cube_size = (size_t)1; @@ -2974,16 +2974,16 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ large_cube_size *= (size_t)edge_size; } /* end for */ - HDassert(large_cube_size < (size_t)(UINT_MAX)); + assert(large_cube_size < (size_t)(UINT_MAX)); small_rank_offset = test_max_rank - small_rank; - HDassert(small_rank_offset >= 1); + assert(small_rank_offset >= 1); /* also, at present, we use 16 bit values in this test -- * hence the following assertion. Delete it if we convert * to 32 bit values. */ - HDassert(large_cube_size < (size_t)(64 * 1024)); + assert(large_cube_size < (size_t)(64 * 1024)); /* Allocate & initialize buffers */ small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size); @@ -3150,11 +3150,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3230,11 +3230,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3264,8 +3264,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); /* verify that the large cube contains only zeros before the slice */ for (s = 0; s < start_index; s++) { @@ -3273,7 +3273,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ data_ok = FALSE; ptr_1++; } /* end for */ - HDassert(s == start_index); + assert(s == start_index); data_ok &= test_select_hyper_checker_board_dr__verify_data( ptr_1, small_rank, edge_size, checker_edge_size, (uint16_t)0, (hbool_t)TRUE); @@ -3281,7 +3281,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ ptr_1 += small_cube_size; s += small_cube_size; - HDassert(s == stop_index + 1); + assert(s == stop_index + 1); /* verify that the large cube contains only zeros after the slice */ for (s = stop_index + 1; s < large_cube_size; s++) { @@ -3350,11 +3350,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( mem_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3445,11 +3445,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ * need for another inner loop. */ - HDassert((sel_start[0] == 0) || (0 < small_rank_offset)); - HDassert((sel_start[1] == 0) || (1 < small_rank_offset)); - HDassert((sel_start[2] == 0) || (2 < small_rank_offset)); - HDassert((sel_start[3] == 0) || (3 < small_rank_offset)); - HDassert((sel_start[4] == 0) || (4 < small_rank_offset)); + assert((sel_start[0] == 0) || (0 < small_rank_offset)); + assert((sel_start[1] == 0) || (1 < small_rank_offset)); + assert((sel_start[2] == 0) || (2 < small_rank_offset)); + assert((sel_start[3] == 0) || (3 < small_rank_offset)); + assert((sel_start[4] == 0) || (4 < small_rank_offset)); test_select_hyper_checker_board_dr__select_checker_board( file_large_cube_sid, large_rank, edge_size, checker_edge_size, small_rank, sel_start); @@ -3488,8 +3488,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ (x * edge_size); stop_index = start_index + small_cube_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= large_cube_size); + assert(start_index < stop_index); + assert(stop_index <= large_cube_size); /* verify that the large cube contains only zeros before the slice */ for (s = 0; s < start_index; s++) { @@ -3497,7 +3497,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ data_ok = FALSE; ptr_1++; } /* end for */ - HDassert(s == start_index); + assert(s == start_index); /* verify that the slice contains the expected data */ data_ok &= test_select_hyper_checker_board_dr__verify_data( @@ -3506,7 +3506,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ ptr_1 += small_cube_size; s += small_cube_size; - HDassert(s == stop_index + 1); + assert(s == stop_index + 1); /* verify that the large cube contains only zeros after the slice */ for (s = stop_index + 1; s < large_cube_size; s++) { @@ -5558,7 +5558,7 @@ test_select_hyper_valid_combination(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Selection Combination Validity\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for single point selection */ single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL); @@ -8448,7 +8448,7 @@ test_shape_same(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Same Shape Comparisons\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for "all" selection */ all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL); @@ -10901,13 +10901,13 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_ htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(0 <= offset); - HDassert(offset < large_rank); - HDassert(edge_size > 0); - HDassert(edge_size <= 1000); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(0 <= offset); + assert(offset < large_rank); + assert(edge_size > 0); + assert(edge_size <= 1000); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tn-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -10959,7 +10959,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num, int small_rank, int large_ */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -11153,21 +11153,21 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(0 < checker_size); - HDassert(checker_size <= edge_size); - HDassert(edge_size <= 1000); - HDassert(0 <= offset); - HDassert(offset < (int)edge_size); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(0 < checker_size); + assert(checker_size <= edge_size); + assert(edge_size <= 1000); + assert(0 <= offset); + assert(offset < (int)edge_size); for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++) if (dim_selected[i] == TRUE) dims_selected++; - HDassert(dims_selected >= 0); - HDassert(dims_selected <= large_rank); + assert(dims_selected >= 0); + assert(dims_selected <= large_rank); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tcheckerboard n-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -11356,7 +11356,7 @@ test_shape_same_dr__checkerboard(int test_num, int small_rank, int large_rank, i */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -11697,22 +11697,22 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int htri_t check; /* Shape comparison return value */ herr_t ret; /* Generic return value */ - HDassert(0 < small_rank); - HDassert(small_rank <= large_rank); - HDassert(large_rank <= SS_DR_MAX_RANK); - HDassert(9 <= edge_size); - HDassert(edge_size <= 1000); - HDassert(0 <= slice_offset); - HDassert(slice_offset < edge_size); - HDassert(-2 <= pattern_offset); - HDassert(pattern_offset <= 2); + assert(0 < small_rank); + assert(small_rank <= large_rank); + assert(large_rank <= SS_DR_MAX_RANK); + assert(9 <= edge_size); + assert(edge_size <= 1000); + assert(0 <= slice_offset); + assert(slice_offset < edge_size); + assert(-2 <= pattern_offset); + assert(pattern_offset <= 2); for (i = SS_DR_MAX_RANK - large_rank; i < SS_DR_MAX_RANK; i++) if (dim_selected[i] == TRUE) dims_selected++; - HDassert(dims_selected >= 0); - HDassert(dims_selected <= large_rank); + assert(dims_selected >= 0); + assert(dims_selected <= large_rank); HDsnprintf(test_desc_0, sizeof(test_desc_0), "\tirregular sub set of n-cube slice through m-cube (n <= m) test %d.\n", test_num); @@ -11810,7 +11810,7 @@ test_shape_same_dr__irregular(int test_num, int small_rank, int large_rank, int */ i = SS_DR_MAX_RANK - large_rank; - HDassert(i >= 0); + assert(i >= 0); start_ptr = &(start[i]); stride_ptr = &(stride[i]); @@ -14294,7 +14294,7 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en hsize_t blocklist[12]; herr_t ret; - HDassert(enblocks <= 2); + assert(enblocks <= 2); /* Copy sid to lim_sid */ lim_sid = H5Scopy(sid); @@ -14332,7 +14332,7 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t endpoints, hssize_t en ERROR("H5Sget_select_hyper_blocklist"); } /* end if */ else { - HDassert(nblocks == (hssize_t)2); + assert(nblocks == (hssize_t)2); if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) { if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0) ERROR("H5Sget_select_hyper_blocklist"); @@ -14760,7 +14760,7 @@ test_internal_consistency(void) /* Output message about test being performed */ MESSAGE(6, ("Testing Consistency of Internal States\n")); - HDassert(SPACE9_DIM2 >= POINT1_NPOINTS); + assert(SPACE9_DIM2 >= POINT1_NPOINTS); /* Create dataspace for "all" selection */ all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL); @@ -15326,7 +15326,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15374,7 +15374,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15445,7 +15445,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15493,7 +15493,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ @@ -15531,7 +15531,7 @@ test_sel_iter(void) case H5S_SEL_ERROR: case H5S_SEL_N: default: - HDassert(0 && "Can't occur"); + assert(0 && "Can't occur"); break; } /* end switch */ diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index 0323d5f..24747dc 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -64,46 +64,46 @@ tts_cancel(void) /* make thread scheduling global */ ret = pthread_attr_init(&attribute); - HDassert(ret == 0); + assert(ret == 0); #ifdef H5_HAVE_SYSTEM_SCOPE_THREADS ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - HDassert(ret == 0); + assert(ret == 0); #endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* Initialize mutex & condition variables */ ret = pthread_mutex_init(&mutex, NULL); - HDassert(ret == 0); + assert(ret == 0); ret = pthread_cond_init(&cond, NULL); - HDassert(ret == 0); + assert(ret == 0); /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file * creation plist and default file access plist */ cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - HDassert(cancel_file >= 0); + assert(cancel_file >= 0); ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL); - HDassert(ret == 0); + assert(ret == 0); tts_cancel_barrier(); ret = pthread_cancel(childthread); - HDassert(ret == 0); + assert(ret == 0); dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT); - HDassert(dataset >= 0); + assert(dataset >= 0); ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); - HDassert(ret >= 0); + assert(ret >= 0); if (buffer != 11) TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer); ret = H5Dclose(dataset); - HDassert(ret >= 0); + assert(ret >= 0); ret = H5Fclose(cancel_file); - HDassert(ret >= 0); + assert(ret >= 0); /* Destroy the thread attribute */ ret = pthread_attr_destroy(&attribute); - HDassert(ret == 0); + assert(ret == 0); } /* end tts_cancel() */ void * diff --git a/test/tunicode.c b/test/tunicode.c index 27df42d..7bc4c68 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -152,7 +152,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string) /* Create a src_type that holds the UTF-8 string and its final NULL */ big_len = length + 1; /* +1 byte for final NULL */ - HDassert((2 * big_len) <= sizeof(cmpbuf)); + assert((2 * big_len) <= sizeof(cmpbuf)); src_type = mkstr(big_len, H5T_STR_NULLTERM); CHECK(src_type, FAIL, "mkstr"); /* Create a dst_type that holds half of the UTF-8 string and a final @@ -215,7 +215,7 @@ test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string) /* Create a src_type that holds the UTF-8 string */ big_len = length; - HDassert((2 * big_len) <= sizeof(cmpbuf)); + assert((2 * big_len) <= sizeof(cmpbuf)); src_type = mkstr(big_len, H5T_STR_NULLPAD); CHECK(src_type, FAIL, "mkstr"); /* Create a dst_type that holds half of the UTF-8 string */ diff --git a/test/tvltypes.c b/test/tvltypes.c index f8b8056..688bb5d 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -2690,13 +2690,13 @@ test_vltypes_fill_value(void) } break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2798,13 +2798,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -2985,13 +2985,13 @@ test_vltypes_fill_value(void) break; case H5D_VIRTUAL: - HDassert(0 && "Invalid layout type!"); + assert(0 && "Invalid layout type!"); break; case H5D_LAYOUT_ERROR: case H5D_NLAYOUTS: default: - HDassert(0 && "Unknown layout type!"); + assert(0 && "Unknown layout type!"); break; } /* end switch */ @@ -277,11 +277,11 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char htri_t tri_ret; ssize_t str_len; - HDassert(dcpl >= 0); - HDassert(vspace >= 0); - HDassert(srcspace >= 0); - HDassert(filename); - HDassert(dsetname); + assert(dcpl >= 0); + assert(vspace >= 0); + assert(srcspace >= 0); + assert(filename); + assert(dsetname); /* Check vspace */ if ((space_out = H5Pget_virtual_vspace(dcpl, i)) < 0) @@ -314,7 +314,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char TEST_ERROR; if ((size_t)str_len != HDstrlen(filename)) TEST_ERROR; - HDassert((size_t)str_len < sizeof(name_out)); + assert((size_t)str_len < sizeof(name_out)); if ((str_len = H5Pget_virtual_filename(dcpl, i, name_out, sizeof(name_out))) < 0) TEST_ERROR; if ((size_t)str_len != HDstrlen(filename)) @@ -327,7 +327,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace, const char TEST_ERROR; if ((size_t)str_len != HDstrlen(dsetname)) TEST_ERROR; - HDassert((size_t)str_len < sizeof(name_out)); + assert((size_t)str_len < sizeof(name_out)); if ((str_len = H5Pget_virtual_dsetname(dcpl, i, name_out, sizeof(name_out))) < 0) TEST_ERROR; if ((size_t)str_len != HDstrlen(dsetname)) @@ -368,13 +368,13 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl, hid_t *ex H5O_native_info_t ninfo; /* Object info struct */ htri_t tri_ret; - HDassert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); - HDassert(fapl >= 0); - HDassert(dcpl >= 0); - HDassert(ex_dcpl); - HDassert(*ex_dcpl < 0); - HDassert(vspace >= 0); - HDassert(filename); + assert((config >= TEST_API_BASIC) && (config < TEST_API_NTESTS)); + assert(fapl >= 0); + assert(dcpl >= 0); + assert(ex_dcpl); + assert(*ex_dcpl < 0); + assert(vspace >= 0); + assert(filename); /* Take different action depending on test configuration */ if (config >= TEST_API_CREATE_DSET) { @@ -104,7 +104,7 @@ static int __k; \ if ((sizes_array)[idx] == 0) { \ \ - HDassert((idx) > 0); \ + assert((idx) > 0); \ (bool_size_fixed) = TRUE; \ } \ else { \ @@ -131,7 +131,7 @@ static int __k; \ if ((types_array)[idx] == H5FD_MEM_NOLIST) { \ \ - HDassert((idx) > 0); \ + assert((idx) > 0); \ (bool_type_fixed) = TRUE; \ } \ else { \ @@ -4184,7 +4184,7 @@ test_vector_io__setup_fixed_size_v(uint32_t count, H5FD_mem_t types[], haddr_t a */ fix_point = ((uint32_t)rand() & (count - 1)) / 2; - HDassert(fix_point < count / 2); + assert(fix_point < count / 2); for (i = 0; i < count; i++) { @@ -4475,7 +4475,7 @@ test_vector_io__dump_test_vectors(uint32_t count, H5FD_mem_t types[], haddr_t ad SET_TYPE(type_fixed, types, type, i); - HDassert((H5FD_MEM_DEFAULT <= type) && (type <= H5FD_MEM_OHDR)); + assert((H5FD_MEM_DEFAULT <= type) && (type <= H5FD_MEM_OHDR)); w_buf = (const char *)(write_bufs[i]); @@ -5220,7 +5220,7 @@ test_selection_io(const char *vfd_name) * Test 3: Strided <> Contiguous 1D I/O */ /* SEL_IO_DIM1 must be even */ - HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); + assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); /* Strided selection in memory */ start[0] = 1; @@ -5269,7 +5269,7 @@ test_selection_io(const char *vfd_name) * Test 4: Contiguous <> Strided 1D I/O */ /* SEL_IO_DIM1 must be even */ - HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); + assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); /* Contiguous selection in memory */ start[0] = 1; @@ -5318,7 +5318,7 @@ test_selection_io(const char *vfd_name) * Test 5: Strided <> Strided 1D I/O */ /* SEL_IO_DIM1 must be even */ - HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); + assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); /* Strided selection in memory */ start[0] = 1; @@ -5474,8 +5474,8 @@ test_selection_io(const char *vfd_name) * Test 8: Strided <> Strided 2D I/O */ /* SEL_IO_DIM0 and SEL_IO_DIM1 must be even */ - HDassert(SEL_IO_DIM0 / 2 == (SEL_IO_DIM0 + 1) / 2); - HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); + assert(SEL_IO_DIM0 / 2 == (SEL_IO_DIM0 + 1) / 2); + assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); /* Strided selection (across dim 1) in memory */ start[0] = 0; @@ -5509,7 +5509,7 @@ test_selection_io(const char *vfd_name) /* Update file buf */ for (i = 0, i2 = 1, j2 = 0; i < SEL_IO_DIM0; i++) for (j = 1; j < SEL_IO_DIM1; j += 2) { - HDassert(i2 < SEL_IO_DIM0); + assert(i2 < SEL_IO_DIM0); fbuf2[i2][j2] = wbuf2[i][j]; if (++j2 == SEL_IO_DIM1) { i2 += 2; @@ -5571,7 +5571,7 @@ test_selection_io(const char *vfd_name) /* Update file buf */ for (i = 1, i2 = 0, j2 = 1; i < (SEL_IO_DIM0 * SEL_IO_DIM1); i += 2) { - HDassert(i2 < SEL_IO_DIM0); + assert(i2 < SEL_IO_DIM0); fbuf2[i2][j2] = wbuf1[i]; j2 += 2; if (j2 >= SEL_IO_DIM1) { @@ -5633,7 +5633,7 @@ test_selection_io(const char *vfd_name) /* Update file buf */ for (i = 0, i2 = 0; i < SEL_IO_DIM0; i += 2) for (j = 0; j < SEL_IO_DIM1; j++) { - HDassert(i2 < (SEL_IO_DIM0 * SEL_IO_DIM1)); + assert(i2 < (SEL_IO_DIM0 * SEL_IO_DIM1)); fbuf1[i2] = wbuf2[i][j]; i2 += 2; } @@ -5668,7 +5668,7 @@ test_selection_io(const char *vfd_name) * Test 11: Strided <> Strided 1D and 2D I/O */ /* SEL_IO_DIM1 must be even */ - HDassert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); + assert(SEL_IO_DIM1 / 2 == (SEL_IO_DIM1 + 1) / 2); /* Strided selection in memory (1D) */ start[0] = 0; @@ -5717,7 +5717,7 @@ test_selection_io(const char *vfd_name) fbuf1[(2 * i) + 1] = wbuf1[2 * i]; for (i = 1, i2 = 0, j2 = 1; i < SEL_IO_DIM0; i += 2) for (j = 0; j < SEL_IO_DIM1; j++) { - HDassert(i2 < SEL_IO_DIM0); + assert(i2 < SEL_IO_DIM0); fbuf2[i2][j2] = wbuf2[i][j]; j2 += 2; if (j2 >= SEL_IO_DIM1) { @@ -5826,7 +5826,7 @@ test_selection_io(const char *vfd_name) * find 1D index into 2D array */ for (i = 0, i2 = 0, j2 = 0; i < SEL_IO_DIM0; i += 2) for (j = 0; j < SEL_IO_DIM1; j++) { - HDassert(i2 < SEL_IO_DIM0); + assert(i2 < SEL_IO_DIM0); fbuf1[(i2 * SEL_IO_DIM1) + j2] = wbuf2[i][j]; j2 += 2; if (j2 >= SEL_IO_DIM1) { @@ -5836,7 +5836,7 @@ test_selection_io(const char *vfd_name) } for (i = 1, i2 = 0, j2 = 1; i < SEL_IO_DIM0; i += 2) for (j = 0; j < SEL_IO_DIM1; j++) { - HDassert(i2 < SEL_IO_DIM0); + assert(i2 < SEL_IO_DIM0); fbuf2[i2][j2] = wbuf2[i][j]; j2 += 2; if (j2 >= SEL_IO_DIM1) { |