diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-29 05:36:16 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-29 05:36:16 (GMT) |
commit | e1747e456cf5605faeaab199cfbb3e72dca6cd40 (patch) | |
tree | 250395108e569cbcea9e749ab73ee90dd58b0234 /test/tmisc.c | |
parent | fefbe61aca1a42e716e900be7af5b382be5e19c1 (diff) | |
download | hdf5-e1747e456cf5605faeaab199cfbb3e72dca6cd40.zip hdf5-e1747e456cf5605faeaab199cfbb3e72dca6cd40.tar.gz hdf5-e1747e456cf5605faeaab199cfbb3e72dca6cd40.tar.bz2 |
[svn-r11307] Purpose:
Code cleanup
Description:
Clean up internals of group creation & iteration code.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Mac OS X (nile)
Too minor to require h5committest
Diffstat (limited to 'test/tmisc.c')
-rw-r--r-- | test/tmisc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/tmisc.c b/test/tmisc.c index d228452..e11bec2 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -256,6 +256,7 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset /* Definitions for misc. test #23 */ #define MISC23_FILE "tmisc23.h5" +#define MISC23_NAME_BUF_SIZE 40 /**************************************************************** ** @@ -3718,6 +3719,8 @@ test_misc23(void) hsize_t dims[] = {10}; hid_t file_id=0, group_id=0, type_id=0, space_id=0, tmp_id=0, create_id=H5P_DEFAULT, access_id=H5P_DEFAULT; + char objname[MISC23_NAME_BUF_SIZE]; /* Name of object */ + H5G_stat_t sb; /* Output message about test being performed */ MESSAGE(5, ("Testing intermediate group creation\n")); @@ -3783,6 +3786,22 @@ test_misc23(void) tmp_id = H5Gcreate_expand(file_id, "/A/B01/grp", 0, create_id, access_id); CHECK(tmp_id, FAIL, "H5Gcreate_expand"); + /* Query that the name of the new group is correct */ + status = H5Iget_name( tmp_id, objname, (size_t)MISC23_NAME_BUF_SIZE ); + CHECK(status, FAIL, "H5Iget_name"); + VERIFY_STR(objname, "/A/B01/grp", "H5Iget_name"); + + status = H5Gclose(tmp_id); + CHECK(status, FAIL, "H5Gclose"); + + /* Check that intermediate group is set up correctly */ + tmp_id = H5Gopen(file_id, "/A/B01"); + CHECK(tmp_id, FAIL, "H5Gopen"); + + status = H5Gget_objinfo(tmp_id, ".", FALSE, &sb); + CHECK(status, FAIL, "H5Gget_objinfo"); + VERIFY(sb.u.obj.nlink,1,"H5Gget_objinfo"); + status = H5Gclose(tmp_id); CHECK(status, FAIL, "H5Gclose"); |