summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-06 14:54:02 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-06 14:54:02 (GMT)
commit29fef95eb5344888737b1c6862b61e3876925831 (patch)
tree0e5c3acc370f2146072d3488498f745004159f3a /tools/h5dump/h5dumpgentest.c
parent8c966a256ab6f1a26264fc3fb56fba1c7bf8b670 (diff)
downloadhdf5-29fef95eb5344888737b1c6862b61e3876925831.zip
hdf5-29fef95eb5344888737b1c6862b61e3876925831.tar.gz
hdf5-29fef95eb5344888737b1c6862b61e3876925831.tar.bz2
[svn-r14190]
Bug fixes Avoid passing iteration flags on the dump_group function parameters but instead inspect the groups's property list just before calling H5Literate and H5Aiterate, in this later case checking the creation order flags with H5Pget_attr_creation_order Tested: windows, linux
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r--tools/h5dump/h5dumpgentest.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 20f7367..101e230 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -6023,9 +6023,33 @@ gent_attr_creation_order(void)
if (H5Tclose(tid) < 0)
goto out;
+/*-------------------------------------------------------------------------
+ * add some attributes to the root group
+ *-------------------------------------------------------------------------
+ */
+ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* add attributes */
+ for(i = 0; i < 3; i++)
+ {
+ if ((aid = H5Acreate2(gid, ".", attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* close attribute */
+ if (H5Aclose(aid) < 0)
+ goto out;
+
+ } /* end for */
+
+ if (H5Gclose(gid) < 0)
+ goto out;
- /* close */
+/*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
if(H5Sclose(sid) < 0)
goto out;
@@ -6038,6 +6062,7 @@ gent_attr_creation_order(void)
if (H5Fclose(fid) < 0)
goto out;
+
return;
@@ -6049,6 +6074,7 @@ out:
H5Sclose(sid);
H5Pclose(gcpl_id);
H5Pclose(dcpl_id);
+ H5Pclose(tcpl_id);
H5Fclose(fid);
} H5E_END_TRY;