diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-28 14:08:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 14:08:44 (GMT) |
commit | 9ef2f993cfc7173712729fb40b34d1edae8509d9 (patch) | |
tree | 937a98f4d50cf0cca08fa105ae37589aedb8975c /test/API | |
parent | f563c2b926445f7a975553bc7742a38f42d3b6f4 (diff) | |
download | hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.zip hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.tar.gz hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.tar.bz2 |
Sync test dir w/ develop (#3303)
Diffstat (limited to 'test/API')
-rw-r--r-- | test/API/tattr.c | 2 | ||||
-rw-r--r-- | test/API/testhdf5.h | 22 | ||||
-rw-r--r-- | test/API/tfile.c | 2 | ||||
-rw-r--r-- | test/API/titerate.c | 8 | ||||
-rw-r--r-- | test/API/tmisc.c | 28 | ||||
-rw-r--r-- | test/API/tselect.c | 4 |
6 files changed, 33 insertions, 33 deletions
diff --git a/test/API/tattr.c b/test/API/tattr.c index 2016160..182d62d 100644 --- a/test/API/tattr.c +++ b/test/API/tattr.c @@ -11768,7 +11768,7 @@ test_attr(void) test_attr_delete(my_fapl); /* Test H5A code for deleting attributes */ /* This next test uses its own file information */ - test_attr_dtype_shared(my_fapl); /* Test using shared dataypes in attributes */ + test_attr_dtype_shared(my_fapl); /* Test using shared datatypes in attributes */ /* This next test uses its own file information */ test_attr_duplicate_ids(my_fapl); diff --git a/test/API/testhdf5.h b/test/API/testhdf5.h index 3d945f8..f2510b2 100644 --- a/test/API/testhdf5.h +++ b/test/API/testhdf5.h @@ -50,7 +50,7 @@ } while (0) #define CHECK_I(ret, where) \ - { \ + do { \ if (VERBOSE_HI) { \ print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", (where), (int)__LINE__, \ __FILE__, (long)(ret)); \ @@ -60,7 +60,7 @@ (int)__LINE__, __FILE__); \ H5Eprint2(H5E_DEFAULT, stdout); \ } \ - } + } while (0) /* Check that a pointer is valid (i.e.: not NULL) */ #define CHECK_PTR(ret, where) \ @@ -207,36 +207,36 @@ #define TEST_STR "Test" #define CLEAN_STR "Cleanup" -#define AT() HDprintf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); +#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__); #define TESTING(WHAT) \ { \ - HDprintf("Testing %-62s", WHAT); \ - HDfflush(stdout); \ + printf("Testing %-62s", WHAT); \ + fflush(stdout); \ } #define TESTING_2(WHAT) \ { \ - HDprintf(" Testing %-60s", WHAT); \ - HDfflush(stdout); \ + printf(" Testing %-60s", WHAT); \ + fflush(stdout); \ } #define PASSED() \ { \ HDputs(" PASSED"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define H5_FAILED() \ { \ HDputs("*FAILED*"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define H5_WARNING() \ { \ HDputs("*WARNING*"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define SKIPPED() \ { \ HDputs(" -SKIP-"); \ - HDfflush(stdout); \ + fflush(stdout); \ } #define PUTS_ERROR(s) \ { \ diff --git a/test/API/tfile.c b/test/API/tfile.c index 8f1cc28..247a249 100644 --- a/test/API/tfile.c +++ b/test/API/tfile.c @@ -693,7 +693,7 @@ test_file_reopen(void) /* Create a dataset in the file */ sid = H5Screate_simple(1, &dims, &dims); - CHECK_I(sid, "H5Screate_simple") + CHECK_I(sid, "H5Screate_simple"); did = H5Dcreate2(fid, REOPEN_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK_I(did, "H5Dcreate2"); diff --git a/test/API/titerate.c b/test/API/titerate.c index 3472866..1349e70 100644 --- a/test/API/titerate.c +++ b/test/API/titerate.c @@ -205,7 +205,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) CHECK(ret, FAIL, "H5Fclose"); /* Sort the dataset names */ - HDqsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); + qsort(lnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); /* Iterate through the datasets in the root group in various ways */ file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); @@ -749,7 +749,7 @@ test_iter_group_large(hid_t fapl) CHECK(ret, FAIL, "H5Tclose"); /* Need to sort the names in the root group, cause that's what the library does */ - HDqsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2); + qsort(names, (size_t)(ITER_NGROUPS + 2), sizeof(iter_info), iter_strcmp2); /* Iterate through the file to see members of the root group */ curr_name = &names[0]; @@ -848,7 +848,7 @@ test_grp_memb_funcs(hid_t fapl) CHECK(ret, FAIL, "H5Fclose"); /* Sort the dataset names */ - HDqsort(dnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); + qsort(dnames, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); /* Iterate through the datasets in the root group in various ways */ file = H5Fopen(DATAFILE, H5F_ACC_RDONLY, fapl); @@ -905,7 +905,7 @@ test_grp_memb_funcs(hid_t fapl) VERIFY(ret, FAIL, "H5Lget_name_by_idx"); /* Sort the dataset names */ - HDqsort(obj_names, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); + qsort(obj_names, (size_t)(NDATASETS + 2), sizeof(char *), iter_strcmp); /* Compare object names */ for (i = 0; i < (int)ginfo.nlinks; i++) { diff --git a/test/API/tmisc.c b/test/API/tmisc.c index bb10399..d4213d2 100644 --- a/test/API/tmisc.c +++ b/test/API/tmisc.c @@ -2396,8 +2396,8 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char CHECK_PTR(new_fp, "fopen"); /* Write the user block to the new file */ - written = HDfwrite(user_block, (size_t)1, size, new_fp); - VERIFY(written, size, "HDfwrite"); + written = fwrite(user_block, (size_t)1, size, new_fp); + VERIFY(written, size, "fwrite"); /* Open the old file */ old_fp = fopen(old_name, "rb"); @@ -2408,19 +2408,19 @@ misc13_insert_user_block(const char *old_name, const char *new_name, const char CHECK_PTR(copy_buf, "malloc"); /* Copy data from the old file to the new file */ - while ((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { + while ((read_in = fread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) { /* Write the data to the new file */ - written = HDfwrite(copy_buf, (size_t)1, read_in, new_fp); - VERIFY(written, read_in, "HDfwrite"); + written = fwrite(copy_buf, (size_t)1, read_in, new_fp); + VERIFY(written, read_in, "fwrite"); } /* Close the old file */ - ret = HDfclose(old_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(old_fp); + VERIFY(ret, 0, "fclose"); /* Close the new file */ - ret = HDfclose(new_fp); - VERIFY(ret, 0, "HDfclose"); + ret = fclose(new_fp); + VERIFY(ret, 0, "fclose"); /* Free the copy buffer */ free(copy_buf); @@ -4835,7 +4835,7 @@ test_misc25a(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create dataype for attribute */ + /* Create datatype for attribute */ tid = H5Tcopy(H5T_C_S1); CHECK(tid, FAIL, "H5Tcopy"); ret = H5Tset_size(tid, (size_t)MISC25A_ATTR1_LEN); @@ -4861,7 +4861,7 @@ test_misc25a(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create dataype for attribute */ + /* Create datatype for attribute */ tid = H5Tcopy(H5T_C_S1); CHECK(tid, FAIL, "H5Tcopy"); ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN); @@ -4931,7 +4931,7 @@ test_misc25a(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create dataype for attribute */ + /* Create datatype for attribute */ tid = H5Tcopy(H5T_C_S1); CHECK(tid, FAIL, "H5Tcopy"); ret = H5Tset_size(tid, (size_t)MISC25A_ATTR3_LEN); @@ -4977,7 +4977,7 @@ test_misc25a(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create dataype for attribute */ + /* Create datatype for attribute */ tid = H5Tcopy(H5T_C_S1); CHECK(tid, FAIL, "H5Tcopy"); ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN); @@ -5039,7 +5039,7 @@ test_misc25a(void) sid = H5Screate(H5S_SCALAR); CHECK(sid, FAIL, "H5Screate"); - /* Create dataype for attribute */ + /* Create datatype for attribute */ tid = H5Tcopy(H5T_C_S1); CHECK(tid, FAIL, "H5Tcopy"); ret = H5Tset_size(tid, (size_t)MISC25A_ATTR2_LEN); diff --git a/test/API/tselect.c b/test/API/tselect.c index 6563d83..fc6a275 100644 --- a/test/API/tselect.c +++ b/test/API/tselect.c @@ -1383,8 +1383,8 @@ test_select_hyper_stride(hid_t xfer_plist) CHECK(ret, FAIL, "H5Dread"); /* Sort the locations into the proper order */ - HDqsort(loc1, (size_t)72, sizeof(size_t), compare_size_t); - HDqsort(loc2, (size_t)72, sizeof(size_t), compare_size_t); + qsort(loc1, (size_t)72, sizeof(size_t), compare_size_t); + qsort(loc2, (size_t)72, sizeof(size_t), compare_size_t); /* Compare data read with data written out */ for (i = 0; i < 72; i++) { tbuf = wbuf + loc1[i]; |