summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-04-11 16:22:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-04-11 16:22:16 (GMT)
commit9d2070890b0cfb2c8a406906da0470e948141db4 (patch)
tree567cc6f6c36d67c78be5e79b3529d30bcbe06a50 /test/tmisc.c
parent78158e8dbffcbf025257a72bb42c1fbe8c7660b7 (diff)
downloadhdf5-9d2070890b0cfb2c8a406906da0470e948141db4.zip
hdf5-9d2070890b0cfb2c8a406906da0470e948141db4.tar.gz
hdf5-9d2070890b0cfb2c8a406906da0470e948141db4.tar.bz2
[svn-r13636] Description:
Change H5[D|G|T]<foo>_expand() "temporary" API routines to H5[D|G|T]<foo>2() "versioned" routines. Also added H5[D|G|T](create|commit)_anon() routines to continue to allow "anonymous" objects to be created in a file. Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c111
1 files changed, 33 insertions, 78 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index bd37a32..f55028b 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -3843,7 +3843,7 @@ test_misc23(void)
CHECK(status, FAIL, "H5Dclose");
/**********************************************************************
- * test H5Gcreate_expand()
+ * test H5Gcreate2()
**********************************************************************/
/* Create link creation property list */
@@ -3855,11 +3855,8 @@ test_misc23(void)
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
- tmp_id = H5Gcreate_expand(file_id, H5P_DEFAULT, access_id);
- CHECK(tmp_id, FAIL, "H5Gcreate_expand");
-
- status = H5Llink(file_id, "/A/B01/grp", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
/* Query that the name of the new group is correct */
status = H5Iget_name( tmp_id, objname, (size_t)MISC23_NAME_BUF_SIZE );
@@ -3881,41 +3878,29 @@ test_misc23(void)
CHECK(status, FAIL, "H5Gclose");
- tmp_id = H5Gcreate_expand(file_id, H5P_DEFAULT, access_id);
- CHECK(tmp_id, FAIL, "H5Gcreate_expand");
-
- status = H5Llink(file_id, "/A/B02/C02/grp", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Gcreate2(file_id, "/A/B02/C02/grp", create_id, H5P_DEFAULT, access_id);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
- tmp_id = H5Gcreate_expand(group_id, H5P_DEFAULT, access_id);
- CHECK(tmp_id, FAIL, "H5Gcreate_expand");
-
- status = H5Llink(group_id, "B03/grp/", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Gcreate2(group_id, "B03/grp/", create_id, H5P_DEFAULT, access_id);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
- if ( (tmp_id = H5Gcreate_expand(group_id, H5P_DEFAULT, access_id)) < 0)
- CHECK(tmp_id, FAIL, "H5Gcreate_expand");
-
- status = H5Llink(group_id, "/A/B04/grp/", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Gcreate2(group_id, "/A/B04/grp/", create_id, H5P_DEFAULT, access_id);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
- if ( (tmp_id = H5Gcreate_expand(file_id, H5P_DEFAULT, access_id)) < 0)
- CHECK(tmp_id, FAIL, "H5Gcreate_expand");
-
- status = H5Llink(file_id, "/A/B05/C05/A", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Gcreate2(file_id, "/A/B05/C05/A", create_id, H5P_DEFAULT, access_id);
+ CHECK(tmp_id, FAIL, "H5Gcreate2");
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
@@ -3926,7 +3911,7 @@ test_misc23(void)
/**********************************************************************
- * test new H5Dcreate
+ * test H5Dcreate2()
**********************************************************************/
/* Create link creation property list */
@@ -3938,51 +3923,36 @@ test_misc23(void)
CHECK(status, FAIL, "H5Pset_create_intermediate_group");
- tmp_id = H5Dcreate_expand(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(tmp_id, FAIL, "H5Dcreate");
+ tmp_id = H5Dcreate2(file_id, "/A/B06/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Dcreate2");
- status = H5Llink(file_id, "/A/B06/dset", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
-
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
- tmp_id = H5Dcreate_expand(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(tmp_id, FAIL, "H5Dcreate");
-
- status = H5Llink(file_id, "/A/B07/B07/dset", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Dcreate2(file_id, "/A/B07/B07/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Dcreate2");
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
- tmp_id = H5Dcreate_expand(group_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(tmp_id, FAIL, "H5Dcreate");
-
- status = H5Llink(group_id, "B08/dset", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Dcreate2(group_id, "B08/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Dcreate2");
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
- tmp_id = H5Dcreate_expand(group_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(tmp_id, FAIL, "H5Dcreate");
-
- status = H5Llink(group_id, "/A/B09/dset", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Dcreate2(group_id, "/A/B09/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Dcreate2");
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
- tmp_id = H5Dcreate_expand(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(tmp_id, FAIL, "H5Dcreate");
-
- status = H5Llink(file_id, "/A/B10/C10/A/dset", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ tmp_id = H5Dcreate2(file_id, "/A/B10/C10/A/dset", type_id, space_id, create_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(tmp_id, FAIL, "H5Dcreate2");
status = H5Dclose(tmp_id);
CHECK(status, FAIL, "H5Dclose");
@@ -3999,7 +3969,7 @@ test_misc23(void)
/**********************************************************************
- * test new H5Tcommit
+ * test H5Tcommit2()
**********************************************************************/
/* Create link creation property list */
@@ -4013,11 +3983,8 @@ test_misc23(void)
tmp_id = H5Tcopy(H5T_NATIVE_INT16);
CHECK(tmp_id, FAIL, "H5Tcopy");
- status = H5Tcommit_expand(file_id, tmp_id, H5P_DEFAULT, access_id);
- CHECK(status, FAIL, "H5Tcommit_expand");
-
- status = H5Llink(file_id, "/A/B11/dtype", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ status = H5Tcommit2(file_id, "/A/B11/dtype", tmp_id, create_id, H5P_DEFAULT, access_id);
+ CHECK(status, FAIL, "H5Tcommit2");
status = H5Tclose(tmp_id);
CHECK(status, FAIL, "H5Tclose");
@@ -4026,11 +3993,8 @@ test_misc23(void)
tmp_id = H5Tcopy(H5T_NATIVE_INT32);
CHECK(tmp_id, FAIL, "H5Tcopy");
- status = H5Tcommit_expand(file_id, tmp_id, H5P_DEFAULT, access_id);
- CHECK(status, FAIL, "H5Tcommit_expand");
-
- status = H5Llink(file_id, "/A/B12/C12/dtype", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ status = H5Tcommit2(file_id, "/A/B12/C12/dtype", tmp_id, create_id, H5P_DEFAULT, access_id);
+ CHECK(status, FAIL, "H5Tcommit2");
status = H5Tclose(tmp_id);
CHECK(status, FAIL, "H5Tclose");
@@ -4039,12 +4003,9 @@ test_misc23(void)
tmp_id = H5Tcopy(H5T_NATIVE_INT64);
CHECK(tmp_id, FAIL, "H5Tcopy");
- status = H5Tcommit_expand(group_id, tmp_id, H5P_DEFAULT, access_id);
- CHECK(status, FAIL, "H5Tcommit_expand");
+ status = H5Tcommit2(group_id, "B13/C12/dtype", tmp_id, create_id, H5P_DEFAULT, access_id);
+ CHECK(status, FAIL, "H5Tcommit2");
- status = H5Llink(group_id, "B13/C12/dtype", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
-
status = H5Tclose(tmp_id);
CHECK(status, FAIL, "H5Tclose");
@@ -4052,11 +4013,8 @@ test_misc23(void)
tmp_id = H5Tcopy(H5T_NATIVE_FLOAT);
CHECK(tmp_id, FAIL, "H5Tcopy");
- status = H5Tcommit_expand(group_id, tmp_id, H5P_DEFAULT, access_id);
- CHECK(status, FAIL, "H5Tcommit_expand");
-
- status = H5Llink(group_id, "/A/B14/dtype", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ status = H5Tcommit2(group_id, "/A/B14/dtype", tmp_id, create_id, H5P_DEFAULT, access_id);
+ CHECK(status, FAIL, "H5Tcommit2");
status = H5Tclose(tmp_id);
CHECK(status, FAIL, "H5Tclose");
@@ -4065,11 +4023,8 @@ test_misc23(void)
tmp_id = H5Tcopy(H5T_NATIVE_DOUBLE);
CHECK(tmp_id, FAIL, "H5Tcopy");
- status = H5Tcommit_expand(file_id, tmp_id, H5P_DEFAULT, access_id);
- CHECK(status, FAIL, "H5Tcommit_expand");
-
- status = H5Llink(file_id, "/A/B15/C15/A/dtype", tmp_id, create_id, H5P_DEFAULT);
- CHECK(status, FAIL, "H5Llink");
+ status = H5Tcommit2(file_id, "/A/B15/C15/A/dtype", tmp_id, create_id, H5P_DEFAULT, access_id);
+ CHECK(status, FAIL, "H5Tcommit2");
status = H5Tclose(tmp_id);
CHECK(status, FAIL, "H5Tclose");