summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-07-03 19:54:14 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-07-03 19:54:14 (GMT)
commit76b9a0e7eff83db3ed69080f62b95ae568f7129e (patch)
tree10e414c609bbc1c37862675a09a8c2c2e4d89289 /test
parentd342358a3b1acd5712b3c136c3985db414f6f673 (diff)
downloadhdf5-76b9a0e7eff83db3ed69080f62b95ae568f7129e.zip
hdf5-76b9a0e7eff83db3ed69080f62b95ae568f7129e.tar.gz
hdf5-76b9a0e7eff83db3ed69080f62b95ae568f7129e.tar.bz2
* Reverted removal of H5I_REFERENCE to avoid breaking binary
compatibility. * Added a quick H5I_REFERENCE smoke check to test_misc19() in tmisc.c.
Diffstat (limited to 'test')
-rw-r--r--test/links.c2
-rw-r--r--test/tfile.c1
-rw-r--r--test/tmisc.c29
3 files changed, 32 insertions, 0 deletions
diff --git a/test/links.c b/test/links.c
index 2d9bb0d..7b3e37d 100644
--- a/test/links.c
+++ b/test/links.c
@@ -7743,6 +7743,7 @@ done:
case H5I_FILE:
case H5I_DATASPACE:
case H5I_ATTR:
+ case H5I_REFERENCE:
case H5I_VFL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
@@ -7829,6 +7830,7 @@ done:
case H5I_FILE:
case H5I_DATASPACE:
case H5I_ATTR:
+ case H5I_REFERENCE:
case H5I_VFL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
diff --git a/test/tfile.c b/test/tfile.c
index 20b41e0..533bb24 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -1393,6 +1393,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
case H5I_DATATYPE:
case H5I_DATASPACE:
case H5I_ATTR:
+ case H5I_REFERENCE:
case H5I_VFL:
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
diff --git a/test/tmisc.c b/test/tmisc.c
index bec80b2..22ae558 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -30,6 +30,7 @@
#include "testhdf5.h"
#include "H5srcdir.h"
#include "H5Dpkg.h" /* Datasets */
+#include "H5Iprivate.h" /* IDs, can be removed when H5I_REFERENCE is gone */
/* Definitions for misc. test #1 */
#define MISC1_FILE "tmisc1.h5"
@@ -3447,6 +3448,34 @@ test_misc19(void)
HDfree(vfd_cls);
+/* Check H5I operations on references */
+
+ /* Reference IDs are not used by the library so there's no
+ * way of testing if incr/decr, etc. work. Instead, just
+ * do a quick smoke check to ensure that a couple of basic
+ * calls return sane values.
+ *
+ * H5I_REFERENCE has been declared deprecated with a tentative
+ * removal version of HDF5 1.12.0.
+ *
+ * Delete this entire block when H5I_REFERENCE no longer exists.
+ *
+ * The H5Iprivate.h header was included to support H5I_nmembers()
+ * so that can also probably be removed as well.
+ */
+{
+ htri_t tf; /* Boolean generic return */
+ int64_t num_members; /* Number of members in type */
+
+ tf = H5Itype_exists(H5I_REFERENCE);
+ VERIFY(tf, TRUE, "H5Itype_exists");
+
+ num_members = 999;
+ num_members = H5I_nmembers(H5I_REFERENCE);
+ VERIFY(num_members, 0, "H5Inmembers");
+
+} /* end block */
+
} /* end test_misc19() */
/****************************************************************