summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-08 14:55:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-08 14:55:11 (GMT)
commitfeaa5bb9d54017961e325f4bc2c366fc023c2443 (patch)
treea84153ea1ed3305049e86ddff013c794b414719b /test
parentc81f060deb2fc82d33ef17a57b3a48718511bdc6 (diff)
downloadhdf5-feaa5bb9d54017961e325f4bc2c366fc023c2443.zip
hdf5-feaa5bb9d54017961e325f4bc2c366fc023c2443.tar.gz
hdf5-feaa5bb9d54017961e325f4bc2c366fc023c2443.tar.bz2
[svn-r8038] Purpose:
Bug fix Description: When two property lists are compared, the H5Pequal routine was just comparing the raw information for the property values. This causes problems when the raw information contains pointers to other information. Solution: Allow a 'compare' callback to be registered for properties, so that a user application get perform the comparison itself, allowing for "deep" compares of the property value. This was exported to the H5Pregister & H5Pinsert routines in the development branch, but not the release branch. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c88
-rw-r--r--test/tgenprop.c162
2 files changed, 248 insertions, 2 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 7c1f123..fe72215 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -71,6 +71,8 @@ const char *FILENAME[] = {
#define DSET_SET_LOCAL_NAME "set_local"
#define DSET_SET_LOCAL_NAME_2 "set_local_2"
#define DSET_ONEBYTE_SHUF_NAME "onebyte_shuffle"
+#define DSET_COMPARE_DCPL_NAME "compare_dcpl"
+#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2"
#define USER_BLOCK 1024
#define SIXTY_FOUR_KB 65536
@@ -2989,6 +2991,91 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_compare_dcpl
+ *
+ * Purpose: Verifies that if the same DCPL was used to create two
+ * datasets, the DCPLs retrieved from each dataset should
+ * compare equal.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, January 7, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_compare_dcpl(hid_t file)
+{
+ hid_t dsid=(-1); /* Dataset ID */
+ hid_t sid=(-1); /* Dataspace ID */
+ hid_t dcpl=(-1); /* Dataspace creation property list ID */
+ hid_t dcpl1=(-1),dcpl2=(-1); /* Dataspace creation property list IDs from datasets */
+ const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
+ const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
+
+ TESTING("comparing dataset creation property lists");
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR
+
+ /* Create dcpl with special filter */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) TEST_ERROR
+ if(H5Pset_chunk(dcpl, 2, chunk_dims)<0) TEST_ERROR
+
+ /* Set gzip parameter (if available) */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ if(H5Pset_deflate (dcpl, 9)<0) TEST_ERROR
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /* Create first dataset */
+ if ((dsid = H5Dcreate(file, DSET_COMPARE_DCPL_NAME, H5T_NATIVE_INT, sid, dcpl)) <0) TEST_ERROR
+
+ /* Get copy of dataset's dataset creation property list */
+ if ((dcpl1=H5Dget_create_plist(dsid))<0) TEST_ERROR
+
+ /* Close dataset */
+ if(H5Dclose (dsid)<0) TEST_ERROR
+
+ /* Create second dataset */
+ if ((dsid = H5Dcreate(file, DSET_COMPARE_DCPL_NAME_2, H5T_NATIVE_INT, sid, dcpl)) <0) TEST_ERROR
+
+ /* Get copy of dataset's dataset creation property list */
+ if ((dcpl2=H5Dget_create_plist(dsid))<0) TEST_ERROR
+
+ /* Close dataset */
+ if(H5Dclose (dsid)<0) TEST_ERROR
+
+ /* Close dataspace */
+ if(H5Sclose(sid)<0) TEST_ERROR
+
+ /* Compare dataset creation property lists */
+ if(H5Pequal(dcpl1,dcpl2)<=0) TEST_ERROR
+
+ /* Close dataset creation property lists */
+ if(H5Pclose(dcpl)<0) TEST_ERROR
+ if(H5Pclose(dcpl1)<0) TEST_ERROR
+ if(H5Pclose(dcpl2)<0) TEST_ERROR
+
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dsid);
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Pclose(dcpl1);
+ H5Pclose(dcpl2);
+ } H5E_END_TRY;
+ return -1;
+} /* end test_compare_dcpl() */
+
+
+/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Tests the dataset interface (H5D)
@@ -3052,6 +3139,7 @@ main(void)
nerrors += test_can_apply(file)<0 ?1:0;
nerrors += test_set_local(fapl)<0 ?1:0;
nerrors += test_can_apply_szip(file)<0 ?1:0;
+ nerrors += test_compare_dcpl(file)<0 ?1:0;
if (H5Fclose(file)<0) goto error;
if (nerrors) goto error;
diff --git a/test/tgenprop.c b/test/tgenprop.c
index e75c9e0..51f1ceb 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -12,8 +12,6 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* $Id$ */
-
/***********************************************************
*
* Test program: tgenprop
@@ -186,11 +184,19 @@ test_genprop_basic_class_prop(void)
VERIFY(ret, 0, "H5Pexist");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Try to insert the first property again (should fail) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
VERIFY(ret, FAIL, "H5Pregister");
/* Check the existance of the first property */
@@ -208,11 +214,19 @@ test_genprop_basic_class_prop(void)
VERIFY(nprops, 1, "H5Pget_nprops");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Try to insert the second property again (should fail) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
VERIFY(ret, FAIL, "H5Pregister");
/* Check the existance of the second property */
@@ -230,7 +244,11 @@ test_genprop_basic_class_prop(void)
VERIFY(nprops, 2, "H5Pget_nprops");
/* Insert third property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Check the existance of the third property */
@@ -333,19 +351,35 @@ test_genprop_class_iter(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert third property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert third property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Check the number of properties in class */
@@ -429,19 +463,35 @@ test_genprop_class_callback(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert third property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert fourth property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Check the number of properties in class */
@@ -530,11 +580,19 @@ test_genprop_basic_list(void)
/* Add several properties (w/default values) */
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Check the number of properties in class */
@@ -632,11 +690,19 @@ test_genprop_basic_list_prop(void)
/* Add several properties (several w/default values) */
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Create a property list from the class */
@@ -651,11 +717,19 @@ test_genprop_basic_list_prop(void)
/* Add temporary properties */
/* Insert first temporary property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pinsert");
/* Insert second temporary property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pinsert");
/* Check the number of properties in list */
@@ -790,11 +864,19 @@ test_genprop_list_iter(void)
/* Add several properties (several w/default values) */
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Create a property list from the class */
@@ -809,11 +891,19 @@ test_genprop_list_iter(void)
/* Add temporary properties */
/* Insert first temporary property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pinsert(lid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pinsert");
/* Insert second temporary property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pinsert(lid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pinsert");
/* Check the number of properties in list */
@@ -872,6 +962,9 @@ typedef struct {
char *cop_name;
void *cop_value;
+ /* Compare information */
+ int cmp_count;
+
/* Close information */
int cls_count;
char *cls_name;
@@ -960,6 +1053,20 @@ test_genprop_prop_cop_cb1(const char *name, size_t size, void *value)
/****************************************************************
**
+** test_genprop_prop_cmp_cb1(): Property comparison callback for test_genprop_list_callback
+**
+****************************************************************/
+static int
+test_genprop_prop_cmp_cb1(const void UNUSED *value1, const void UNUSED *value2, size_t UNUSED size)
+{
+ /* Set the information from the comparison call */
+ prop1_cb_info.cmp_count++;
+
+ return(0);
+}
+
+/****************************************************************
+**
** test_genprop_prop_cls_cb1(): Property close callback for test_genprop_list_callback
**
****************************************************************/
@@ -1027,19 +1134,35 @@ test_genprop_list_callback(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,test_genprop_prop_crt_cb1,test_genprop_prop_set_cb1,test_genprop_prop_get_cb1,NULL,test_genprop_prop_cop_cb1,test_genprop_prop_cls_cb1);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,test_genprop_prop_crt_cb1,test_genprop_prop_set_cb1,test_genprop_prop_get_cb1,NULL,test_genprop_prop_cop_cb1,test_genprop_prop_cmp_cb1,test_genprop_prop_cls_cb1);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with only delete callback) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,test_genprop_prop_del_cb2,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,test_genprop_prop_del_cb2,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert third property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP3_NAME,PROP3_SIZE,PROP3_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert fourth property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP4_NAME,PROP4_SIZE,PROP4_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Check the number of properties in class */
@@ -1169,6 +1292,13 @@ test_genprop_list_callback(void)
VERIFY(cop_cb_struct.count, 1, "H5Pcopy");
VERIFY(cop_cb_struct.id, lid2, "H5Pcopy");
+ /* Compare the two lists */
+ ret = H5Pequal(lid1,lid2);
+ VERIFY(ret, 1, "H5Pequal");
+
+ /* Verify compare callback information for properties tracked */
+ VERIFY(prop1_cb_info.cmp_count, 1, "H5Pequal");
+
/* Close first list */
ret = H5Pclose(lid1);
CHECK_I(ret, "H5Pclose");
@@ -1240,7 +1370,11 @@ test_genprop_list_addprop(void)
CHECK(pid, FAIL, "H5Pcreate");
/* Insert temporary property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pinsert(pid,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pinsert(pid,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pinsert");
/* Check existence of added property */
@@ -1319,7 +1453,11 @@ test_genprop_class_addprop(void)
VERIFY(ret, 0, "H5Pexist");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Create a derived dataset creation property list */
@@ -1396,11 +1534,19 @@ test_genprop_equal(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Create a property list from the class */
@@ -1444,7 +1590,11 @@ test_genprop_path(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Get full path for first class */
@@ -1461,7 +1611,11 @@ test_genprop_path(void)
CHECK_I(cid2, "H5Pcreate_class");
/* Insert second property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid2,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid2,PROP2_NAME,PROP2_SIZE,PROP2_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Get full path for second class */
@@ -1519,7 +1673,11 @@ test_genprop_refcount(void)
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with no callbacks) */
+#ifdef H5_WANT_H5_V1_6_COMPAT
ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL);
+#else /* H5_WANT_H5_V1_6_COMPAT */
+ ret = H5Pregister(cid1,PROP1_NAME,PROP1_SIZE,PROP1_DEF_VALUE,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#endif /* H5_WANT_H5_V1_6_COMPAT */
CHECK_I(ret, "H5Pregister");
/* Create a new generic list, derived from the root of the class hierarchy */