summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-11-14 23:13:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-11-14 23:13:36 (GMT)
commit6ff7489679f1851d7146858deda6a6b8d311a2c7 (patch)
tree1bf88c337e2d674806c9ca2c92506f916b9fcd3f /test
parentfc0465ca892d2407206fc225d128aab253a95b90 (diff)
downloadhdf5-6ff7489679f1851d7146858deda6a6b8d311a2c7.zip
hdf5-6ff7489679f1851d7146858deda6a6b8d311a2c7.tar.gz
hdf5-6ff7489679f1851d7146858deda6a6b8d311a2c7.tar.bz2
[svn-r2900] Purpose:
Code development Description: Adding more generic property list tests for new functions. Platforms tested: FreeBSD 4.1.1 (hawkwind)
Diffstat (limited to 'test')
-rw-r--r--test/tgenprop.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 3fb2b3a..433b070 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -43,6 +43,8 @@ static void
test_genprop_basic_class(void)
{
hid_t cid1; /* Generic Property class ID */
+ hid_t cid2; /* Generic Property class ID */
+ hid_t cid3; /* Generic Property class ID */
char *name; /* Name of class */
herr_t ret; /* Generic return value */
@@ -62,6 +64,22 @@ test_genprop_basic_class(void)
} /* end if */
free(name);
+ /* Check class parent */
+ cid2 = H5Pget_class_parent(cid1);
+ CHECK_I(cid2, "H5Pget_class_parent");
+
+ /* Verify class parent correct */
+ ret = H5Pequal(cid2,H5P_NO_CLASS_NEW);
+ VERIFY(ret, 1, "H5Pequal");
+
+ /* Make certain false postives aren't being returned */
+ ret = H5Pequal(cid2,H5P_FILE_CREATE_NEW);
+ VERIFY(ret, 0, "H5Pequal");
+
+ /* Close parent class */
+ ret = H5Pclose_class(cid2);
+ CHECK_I(ret, "H5Pclose_class");
+
/* Close class */
ret = H5Pclose_class(cid1);
CHECK_I(ret, "H5Pclose_class");
@@ -79,6 +97,30 @@ test_genprop_basic_class(void)
} /* end if */
free(name);
+ /* Check class parent */
+ cid2 = H5Pget_class_parent(cid1);
+ CHECK_I(cid2, "H5Pget_class_parent");
+
+ /* Verify class parent correct */
+ ret = H5Pequal(cid2,H5P_FILE_CREATE_NEW);
+ VERIFY(ret, 1, "H5Pequal");
+
+ /* Check class parent's parent */
+ cid3 = H5Pget_class_parent(cid2);
+ CHECK_I(cid3, "H5Pget_class_parent");
+
+ /* Verify class parent's parent correct */
+ ret = H5Pequal(cid3,H5P_NO_CLASS_NEW);
+ VERIFY(ret, 1, "H5Pequal");
+
+ /* Close parent class's parent */
+ ret = H5Pclose_class(cid3);
+ CHECK_I(ret, "H5Pclose_class");
+
+ /* Close parent class */
+ ret = H5Pclose_class(cid2);
+ CHECK_I(ret, "H5Pclose_class");
+
/* Close class */
ret = H5Pclose_class(cid1);
CHECK_I(ret, "H5Pclose_class");