diff options
-rw-r--r-- | test/cmpd_dset.c | 13 | ||||
-rw-r--r-- | test/dsets.c | 16 | ||||
-rw-r--r-- | test/th5p.c | 18 |
3 files changed, 12 insertions, 35 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index b0586f6..e45c8ea 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -54,19 +54,6 @@ typedef struct s5_t { #define NY 2000 -static hid_t -H5Pcreate_simple (int ndims, size_t *dim) -{ - herr_t status; - hid_t pid = H5Pcreate (H5P_SIMPLE); - assert (pid>=0); - status = H5Pset_space (pid, ndims, dim); - assert (status>=0); - return pid; -} - - - /*------------------------------------------------------------------------- * Function: main * diff --git a/test/dsets.c b/test/dsets.c index 1d88cff..51c5b41 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -51,11 +51,10 @@ test_create(hid_t file) printf("%-70s", "Testing create/open/close"); /* Create the data space */ - space = H5Pcreate(H5P_SIMPLE); dims[0] = 256; dims[1] = 512; - status = H5Pset_space(space, 2, dims); - assert(status >= 0); + space = H5Pcreate_simple(2,dims); + assert(space != FAIL); /* * Create a dataset using the default dataset creation properties. We're @@ -204,11 +203,10 @@ test_simple_io(hid_t file) } /* Create the data space */ - space = H5Pcreate(H5P_SIMPLE); dims[0] = 100; dims[1] = 200; - status = H5Pset_space(space, 2, dims); - assert(status >= 0); + space = H5Pcreate_simple(2,dims); + assert(space != FAIL); /* Create the dataset */ dataset = H5Dcreate(file, DSET_SIMPLE_IO_NAME, H5T_NATIVE_INT, space, @@ -294,11 +292,9 @@ test_tconv(hid_t file) ((int32 *) out)[i] = 0x11223344; /* Create the data space */ - space = H5Pcreate(H5P_SIMPLE); - assert(space >= 0); dims[0] = 1000000; - status = H5Pset_space(space, 1, dims); - assert(status >= 0); + space = H5Pcreate_simple(1,dims); + assert(space != FAIL); /* Create the data set */ dataset = H5Dcreate(file, DSET_TCONV_NAME, H5T_NATIVE_INT32, space, diff --git a/test/th5p.c b/test/th5p.c index 78ec4a9..223c54e 100644 --- a/test/th5p.c +++ b/test/th5p.c @@ -73,15 +73,12 @@ test_h5p_basic(void) fid1 = H5Fcreate(FILE, H5ACC_OVERWRITE, 0, 0); CHECK(fid1, FAIL, "H5Fcreate"); - sid1 = H5Pcreate(H5P_SIMPLE); - CHECK(sid1, FAIL, "H5Mcreate"); - - ret = H5Pset_space(sid1, SPACE1_RANK, dims1); - CHECK(ret, FAIL, "H5Pset_space"); + sid1 = H5Pcreate_simple(SPACE1_RANK, dims1); + CHECK(sid1, FAIL, "H5Pcreate_simple"); n = H5Pget_npoints(sid1); - CHECK(n, UFAIL, "H5Pnelem"); - VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Pnelem"); + CHECK(n, UFAIL, "H5Pget_npoints"); + VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Pget_npoints"); rank = H5Pget_ndims(sid1); CHECK(rank, UFAIL, "H5Pget_lrank"); @@ -91,11 +88,8 @@ test_h5p_basic(void) CHECK(ret, FAIL, "H5Pget_ldims"); VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Pget_ldims"); - sid2 = H5Pcreate(H5P_SIMPLE); - CHECK(sid2, FAIL, "H5Mcreate"); - - ret = H5Pset_space(sid2, SPACE2_RANK, dims2); - CHECK(ret, FAIL, "H5Pset_space"); + sid2 = H5Pcreate_simple(SPACE2_RANK, dims2); + CHECK(sid2, FAIL, "H5Pcreate_simple"); n = H5Pget_npoints(sid2); CHECK(n, UFAIL, "H5Pnelem"); |