diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-23 16:59:53 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-05-23 16:59:53 (GMT) |
commit | 7d289e8a697aba2f537a62d3b6352e357b3bd83b (patch) | |
tree | f8ee2ad40254c1a19f0512cca1eabdb06801c17c /test | |
parent | 1440f1cd87522330ed5bff30d546cacc05adf18e (diff) | |
download | hdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.zip hdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.tar.gz hdf5-7d289e8a697aba2f537a62d3b6352e357b3bd83b.tar.bz2 |
[svn-r22395] remove the high level ID implementation that wraps the actual ID, and
store the VOL plugin in an auxilary structure in the ID pointer.
Diffstat (limited to 'test')
-rw-r--r-- | test/dtypes.c | 10 | ||||
-rw-r--r-- | test/links.c | 12 | ||||
-rw-r--r-- | test/objcopy.c | 33 | ||||
-rw-r--r-- | test/tattr.c | 23 | ||||
-rw-r--r-- | test/tfile.c | 6 | ||||
-rw-r--r-- | test/th5o.c | 26 |
6 files changed, 17 insertions, 93 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 88fcc51..23a7bac 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2987,11 +2987,6 @@ test_compound_16(void) if((int_id = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR if(H5Tcommit2(file, "int", int_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - /* MSC - workaround datatypes */ - if(H5Tclose(int_id) < 0) goto error; - if((int_id = H5Topen2(file, "int", H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR - /* Create file compound datatype */ if((cmpd_f_tid = H5Tcreate(H5T_COMPOUND, 2 * sizeof(int) + 2)) < 0) TEST_ERROR if(H5Tinsert(cmpd_f_tid, "i1", (size_t)0, int_id) < 0) TEST_ERROR @@ -3739,11 +3734,6 @@ test_named (hid_t fapl) goto error; } - /* MSC - workaround datatypes */ - if(H5Tclose(type) < 0) goto error; - if((type = H5Topen2(file, "native-int", H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR - /* It should be possible to define an attribute for the named type */ if((attr1 = H5Acreate2(type, "attr1", H5T_NATIVE_UCHAR, space, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; diff --git a/test/links.c b/test/links.c index 6d69fea..329b9a2 100644 --- a/test/links.c +++ b/test/links.c @@ -7380,17 +7380,17 @@ done: /* Close the target object if we opened it */ if(target_obj >= 0) { switch(H5Iget_type(target_obj)) { - case H5I_GROUP_PUBLIC: + case H5I_GROUP: if(H5Gclose(target_obj) < 0) ret_value = -1; break; - case H5I_DATASET_PUBLIC: + case H5I_DATASET: if(H5Dclose(target_obj) < 0) ret_value = -1; break; - case H5I_DATATYPE_PUBLIC: + case H5I_DATATYPE: if(H5Tclose(target_obj) < 0) ret_value = -1; break; @@ -7467,17 +7467,17 @@ done: /* Close the target object if we opened it */ if(target_obj >= 0) { switch(H5Iget_type(target_obj)) { - case H5I_GROUP_PUBLIC: + case H5I_GROUP: if(H5Gclose(target_obj) < 0) ret_value = -1; break; - case H5I_DATASET_PUBLIC: + case H5I_DATASET: if(H5Dclose(target_obj) < 0) ret_value = -1; break; - case H5I_DATATYPE_PUBLIC: + case H5I_DATATYPE: if(H5Tclose(target_obj) < 0) ret_value = -1; break; diff --git a/test/objcopy.c b/test/objcopy.c index 53ccebd..ce0f3d3 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -1850,11 +1850,6 @@ test_copy_named_datatype_attr_self(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap /* create named datatype */ if((H5Tcommit2(fid_src, NAME_DATATYPE_SIMPLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround named datatypes */ - if(H5Tclose(tid) < 0) goto error; - if((tid = H5Topen2(fid_src, NAME_DATATYPE_SIMPLE, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR - /* create dataspace */ if((sid = H5Screate_simple(2, dims, NULL)) < 0) TEST_ERROR @@ -9634,10 +9629,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds if((tid3 = H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR if((H5Tcommit2(fid_src, SRC_NDT_INT, tid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid3) < 0) TEST_ERROR - if((tid3 = H5Topen2(fid_src, SRC_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - /* set dataspace dimensions */ dim1d[0]=DIM_SIZE_1; @@ -9657,10 +9648,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds if((tid5 = H5Tcopy(H5T_NATIVE_SHORT)) < 0) TEST_ERROR if((H5Tcommit_anon(fid_src, tid5, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid4) < 0) TEST_ERROR - if((tid4 = H5Topen2(fid_src, SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - /* create an attribute of anon ndt (short); attach to committed datatype (double) */ if((aid = H5Acreate2(tid4, SRC_ATTR, tid5, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -9689,10 +9676,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds if((tid2 = H5Tcopy(H5T_NATIVE_FLOAT)) < 0) TEST_ERROR if((H5Tcommit2(fid_dst, DST_NDT_FLOAT, tid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid2) < 0) TEST_ERROR - if((tid2 = H5Topen2(fid_dst, DST_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - /* create an attribute of native integer; attach to committed datatype (float) */ if((aid = H5Acreate2(tid2, DST_ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -9706,10 +9689,6 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds if((tid4 = H5Tcopy(H5T_NATIVE_SHORT)) < 0) TEST_ERROR if((H5Tcommit_anon(fid_dst, tid4, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid3) < 0) TEST_ERROR - if((tid3 = H5Topen2(fid_dst, DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - /* create an attribute of anon ndt (short); attach to ndt (double) */ if((aid = H5Acreate2(tid3, DST_ATTR, tid4, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -10468,10 +10447,6 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)TEST_ERROR if((H5Tcommit2(fid_dst, DST_NDT_INT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid) < 0) TEST_ERROR - if((tid = H5Topen2(fid_dst, DST_NDT_INT, H5P_DEFAULT)) < 0) TEST_ERROR - /* create an attribute attached to committed datatype */ if((aid = H5Acreate2(tid, DST_ATTR, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -10485,10 +10460,6 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if((tid = H5Tcopy(H5T_NATIVE_FLOAT)) < 0)TEST_ERROR if((H5Tcommit2(fid_dst, DST_NDT_FLOAT, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid) < 0) TEST_ERROR - if((tid = H5Topen2(fid_dst, DST_NDT_FLOAT, H5P_DEFAULT)) < 0) TEST_ERROR - /* create an attribute attached to committed datatype */ if((aid = H5Acreate2(tid, DST_ATTR, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR @@ -10545,10 +10516,6 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, if((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)TEST_ERROR if((H5Tcommit2(fid_dst, DST_NDT_DOUBLE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR - /* MSC - workaround committed datatypes */ - if(H5Tclose(tid) < 0) TEST_ERROR - if((tid = H5Topen2(fid_dst, DST_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR - /* get datatype */ if((tid_short = H5Topen2(fid_dst, "/" DST_GRP2 "/" DST_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR diff --git a/test/tattr.c b/test/tattr.c index ee6707f..6556e09 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -9832,12 +9832,6 @@ test_attr_bug3(hid_t fcpl, hid_t fapl) did = H5Dcreate2(fid, "dset", tid2, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(did, FAIL, "H5Dcreate2"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(tid1); - CHECK(ret, FAIL, "H5Tclose"); - tid1 = H5Topen2(fid, "dtype", H5P_DEFAULT); - CHECK(tid1, FAIL, "H5Topen2"); - /* Create attribute on datatype, using that datatype as its datatype */ aid1 = H5Acreate2(tid1, "attr", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid1, FAIL, "H5Acreate2"); @@ -9979,12 +9973,6 @@ test_attr_bug4(hid_t fcpl, hid_t fapl) aid2 = H5Acreate2(did, "attr", tid, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid2, FAIL, "H5Acreate2"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(tid); - CHECK(ret, FAIL, "H5Tclose"); - tid = H5Topen2(fid, "dtype", H5P_DEFAULT); - CHECK(tid, FAIL, "H5Topen2"); - /* Create attribute on datatype (this is the main test) */ aid3 = H5Acreate2(tid, "attr", tid, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid3, FAIL, "H5Acreate2"); @@ -10069,11 +10057,6 @@ test_attr_bug5(hid_t fcpl, hid_t fapl) aidd1 = H5Acreate2(did1, BUG3_ATTR_NAME, tid1, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aidd1, FAIL, "H5Acreate2"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(tid1); - CHECK(ret, FAIL, "H5Tclose"); - tid1 = H5Topen2(fid1, BUG3_DT_NAME, H5P_DEFAULT); - CHECK(tid1, FAIL, "H5Topen2"); /* Create attribute on datatype */ aidt1 = H5Acreate2(tid1, BUG3_ATTR_NAME, tid1, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aidt1, FAIL, "H5Acreate2"); @@ -10278,11 +10261,7 @@ test_attr_bug7(hid_t fcpl, hid_t fapl) */ sid = H5Screate_simple(1, &dims_s, NULL); CHECK(sid, FAIL, "H5Screate_simple"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(tid); - CHECK(ret, FAIL, "H5Tclose"); - tid = H5Topen2(fid, TYPE1_NAME, H5P_DEFAULT); - CHECK(tid, FAIL, "H5Topen2"); + aid = H5Acreate2(tid, ATTR1_NAME, H5T_STD_I8LE, sid, H5P_DEFAULT, H5P_DEFAULT); CHECK(aid, FAIL, "H5Acreate2"); diff --git a/test/tfile.c b/test/tfile.c index 773ff1d..1cfcdbd 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1166,19 +1166,19 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, id_type = H5Iget_type(oid_list[i]); switch(id_type) { - case H5I_FILE_PUBLIC: + case H5I_FILE: if(oid_list[i] != fid1 && oid_list[i] != fid2 && oid_list[i] != fid3 && oid_list[i] != fid4) ERROR("H5Fget_obj_ids"); break; - case H5I_GROUP_PUBLIC: + case H5I_GROUP: if(oid_list[i] != gid1 && oid_list[i] != gid2 && oid_list[i] != gid3) ERROR("H5Fget_obj_ids"); break; - case H5I_DATASET_PUBLIC: + case H5I_DATASET: VERIFY(oid_list[i], did, "H5Fget_obj_ids"); break; diff --git a/test/th5o.c b/test/th5o.c index f504690..7dc21b1 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -93,11 +93,11 @@ test_h5o_open(void) /* Make sure that each is the right kind of ID */ id_type = H5Iget_type(grp); - VERIFY(id_type, H5I_GROUP_PUBLIC, "H5Iget_type for group ID"); + VERIFY(id_type, H5I_GROUP, "H5Iget_type for group ID"); id_type = H5Iget_type(dtype); - VERIFY(id_type, H5I_DATATYPE_PUBLIC, "H5Iget_type for datatype ID"); + VERIFY(id_type, H5I_DATATYPE, "H5Iget_type for datatype ID"); id_type = H5Iget_type(dset); - VERIFY(id_type, H5I_DATASET_PUBLIC, "H5Iget_type for dataset ID"); + VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID"); /* Do something more complex with each of the IDs to make sure they "work" */ ret = H5Gget_info(grp, &ginfo); @@ -162,7 +162,7 @@ test_h5o_close(void) /* Create the group and close it with H5Oclose */ grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(grp, FAIL, "H5Gcreate2"); - VERIFY(H5Iget_type(grp), H5I_GROUP_PUBLIC, "H5Iget_type"); + VERIFY(H5Iget_type(grp), H5I_GROUP, "H5Iget_type"); ret = H5Oclose(grp); CHECK(ret, FAIL, "H5Oclose"); @@ -306,11 +306,11 @@ test_h5o_open_by_addr(void) /* Make sure that each is the right kind of ID */ id_type = H5Iget_type(grp); - VERIFY(id_type, H5I_GROUP_PUBLIC, "H5Iget_type for group ID"); + VERIFY(id_type, H5I_GROUP, "H5Iget_type for group ID"); id_type = H5Iget_type(dtype); - VERIFY(id_type, H5I_DATATYPE_PUBLIC, "H5Iget_type for datatype ID"); + VERIFY(id_type, H5I_DATATYPE, "H5Iget_type for datatype ID"); id_type = H5Iget_type(dset); - VERIFY(id_type, H5I_DATASET_PUBLIC, "H5Iget_type for dataset ID"); + VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID"); /* Do something more complex with each of the IDs to make sure they "work" */ ret = H5Gget_info(grp, &ginfo); @@ -395,12 +395,6 @@ test_h5o_refcount(void) ret = H5Tcommit2(fid, "datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tcommit2"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(dtype); - CHECK(ret, FAIL, "H5Tclose"); - dtype = H5Topen2(fid, "datatype", H5P_DEFAULT); - CHECK(dtype, FAIL, "H5Topen2"); - /* Create the data space for the dataset. */ dims[0] = DIM0; dims[1] = DIM1; @@ -966,12 +960,6 @@ test_h5o_comment(void) ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(ret, FAIL, "H5Tcommit2"); - /* MSC - workaround committed datatypes */ - ret = H5Tclose(dtype); - CHECK(ret, FAIL, "H5Tclose"); - dtype = H5Topen2(fid, "group/datatype", H5P_DEFAULT); - CHECK(dtype, FAIL, "H5Topen2"); - /* Putting a comment on the committed data type */ ret = H5Oset_comment(dtype, dtype_comment); CHECK(ret, FAIL, "H5Oset_comment"); |