summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
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/tmisc.c
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/tmisc.c')
-rw-r--r--test/tmisc.c29
1 files changed, 29 insertions, 0 deletions
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() */
/****************************************************************