summaryrefslogtreecommitdiffstats
path: root/test/tid.c
diff options
context:
space:
mode:
authorSongyu Lu <songyulu@hdfgroup.org>2019-04-04 18:16:27 (GMT)
committerSongyu Lu <songyulu@hdfgroup.org>2019-04-04 18:16:27 (GMT)
commit5e7cccb5a2813c203fc9493a2c0d42c9f666d5af (patch)
tree257600fe3193e2f324d8dd8fe193a14e23a186e8 /test/tid.c
parent50d9a397ab4bcbeaa6466eabe1c2ec6e2cf61f89 (diff)
parentaa696a47715c3dd9c068f71915c6dcf23745441c (diff)
downloadhdf5-5e7cccb5a2813c203fc9493a2c0d42c9f666d5af.zip
hdf5-5e7cccb5a2813c203fc9493a2c0d42c9f666d5af.tar.gz
hdf5-5e7cccb5a2813c203fc9493a2c0d42c9f666d5af.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~songyulu/hdf5_ray into HDFFV-10658-performance-drop-from-1-8
Diffstat (limited to 'test/tid.c')
-rw-r--r--test/tid.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/test/tid.c b/test/tid.c
index 8a27c3b..7f61c6a 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -251,7 +251,10 @@ static int id_predefined_test(void )
testObj = HDmalloc(sizeof(int));
- /* Try to perform illegal functions on various predefined types */
+ /*
+ * Attempt to perform public functions on various library types
+ */
+
H5E_BEGIN_TRY
testID = H5Iregister(H5I_FILE, testObj);
H5E_END_TRY
@@ -292,7 +295,26 @@ static int id_predefined_test(void )
if(testErr >= 0)
goto out;
- /* Create a datatype ID and try to perform illegal functions on it */
+ H5E_BEGIN_TRY
+ testErr = H5Itype_exists(H5I_GROUP);
+ H5E_END_TRY
+
+ VERIFY(testErr, -1, "H5Itype_exists");
+ if(testErr != -1)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testErr = H5Itype_exists(H5I_ATTR);
+ H5E_END_TRY
+
+ VERIFY(testErr, -1, "H5Itype_exists");
+ if(testErr != -1)
+ goto out;
+
+ /*
+ * Create a datatype ID and try to perform illegal functions on it
+ */
+
typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
if(typeID == H5I_INVALID_HID)
@@ -317,7 +339,7 @@ static int id_predefined_test(void )
H5Tclose(typeID);
/* testObj was never registered as an atom, so it will not be
- * automatically freed. */
+ * automatically freed. */
HDfree(testObj);
return 0;