mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r2900] Purpose:
Code development Description: Adding more generic property list tests for new functions. Platforms tested: FreeBSD 4.1.1 (hawkwind)
This commit is contained in:
parent
fc0465ca89
commit
6ff7489679
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user