summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/tgenprop.c536
1 files changed, 277 insertions, 259 deletions
diff --git a/test/tgenprop.c b/test/tgenprop.c
index aad0db8..efc2b3b 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -80,7 +80,7 @@ test_genprop_basic_class(void)
MESSAGE(5, ("Testing Basic Generic Property List Class Creation Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* Check class name */
@@ -111,7 +111,7 @@ test_genprop_basic_class(void)
CHECK_I(ret, "H5Pclose_class");
/* Create another new generic class, derived from file creation class */
- cid1 = H5Pcreate_class(H5P_FILE_CREATE,CLASS2_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_FILE_CREATE,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* Check class name */
@@ -168,128 +168,108 @@ test_genprop_basic_class_prop(void)
MESSAGE(5, ("Testing Basic Generic Property List Class Properties Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 0, "H5Pget_nprops");
/* Check the existance of the first property (should fail) */
- ret = H5Pexist(cid1,PROP1_NAME);
+ ret = H5Pexist(cid1, PROP1_NAME);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ VERIFY(ret, FAIL, "H5Pregister2");
/* Check the existance of the first property */
- ret = H5Pexist(cid1,PROP1_NAME);
+ ret = H5Pexist(cid1, PROP1_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check the size of the first property */
- ret = H5Pget_size(cid1,PROP1_NAME,&size);
+ ret = H5Pget_size(cid1, PROP1_NAME, &size);
CHECK_I(ret, "H5Pget_size");
VERIFY(size, PROP1_SIZE, "H5Pget_size");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ VERIFY(ret, FAIL, "H5Pregister2");
/* Check the existance of the second property */
- ret = H5Pexist(cid1,PROP2_NAME);
+ ret = H5Pexist(cid1, PROP2_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check the size of the second property */
- ret = H5Pget_size(cid1,PROP2_NAME,&size);
+ ret = H5Pget_size(cid1, PROP2_NAME, &size);
CHECK_I(ret, "H5Pget_size");
VERIFY(size, PROP2_SIZE, "H5Pget_size");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
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");
+ ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Check the existance of the third property */
- ret = H5Pexist(cid1,PROP3_NAME);
+ ret = H5Pexist(cid1, PROP3_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check the size of the third property */
- ret = H5Pget_size(cid1,PROP3_NAME,&size);
+ ret = H5Pget_size(cid1, PROP3_NAME, &size);
CHECK_I(ret, "H5Pget_size");
VERIFY(size, PROP3_SIZE, "H5Pget_size");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 3, "H5Pget_nprops");
/* Unregister first property */
- ret = H5Punregister(cid1,PROP1_NAME);
+ ret = H5Punregister(cid1, PROP1_NAME);
CHECK_I(ret, "H5Punregister");
/* Try to check the size of the first property (should fail) */
- ret = H5Pget_size(cid1,PROP1_NAME,&size);
+ ret = H5Pget_size(cid1, PROP1_NAME, &size);
VERIFY(ret, FAIL, "H5Pget_size");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 2, "H5Pget_nprops");
/* Unregister second property */
- ret = H5Punregister(cid1,PROP2_NAME);
+ ret = H5Punregister(cid1, PROP2_NAME);
CHECK_I(ret, "H5Punregister");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 1, "H5Pget_nprops");
/* Unregister third property */
- ret = H5Punregister(cid1,PROP3_NAME);
+ ret = H5Punregister(cid1, PROP3_NAME);
CHECK_I(ret, "H5Punregister");
/* Check the number of properties in class */
- ret = H5Pget_nprops(cid1,&nprops);
+ ret = H5Pget_nprops(cid1, &nprops);
CHECK_I(ret, "H5Pget_nprops");
VERIFY(nprops, 0, "H5Pget_nprops");
@@ -344,40 +324,24 @@ test_genprop_class_iter(void)
MESSAGE(5, ("Testing Basic Generic Property List Class Property Iteration Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Check the number of properties in class */
ret = H5Pget_nprops(cid1,&nprops);
@@ -456,40 +420,24 @@ test_genprop_class_callback(void)
MESSAGE(5, ("Testing Basic Generic Property List Class Callback Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,test_genprop_cls_cb1,&crt_cb_struct,NULL,NULL,test_genprop_cls_cb1,&cls_cb_struct);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,test_genprop_cls_cb1,&crt_cb_struct,NULL, NULL,test_genprop_cls_cb1,&cls_cb_struct);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Check the number of properties in class */
ret = H5Pget_nprops(cid1,&nprops);
@@ -571,26 +519,18 @@ test_genprop_basic_list(void)
MESSAGE(5, ("Testing Basic Generic Property List Creation Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* 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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Check the number of properties in class */
ret = H5Pget_nprops(cid1,&nprops);
@@ -627,24 +567,24 @@ test_genprop_basic_list(void)
VERIFY(nprops, 2, "H5Pget_nprops");
/* Check existence of properties */
- ret = H5Pexist(lid1,PROP1_NAME);
+ ret = H5Pexist(lid1, PROP1_NAME);
VERIFY(ret, 1, "H5Pexist");
- ret = H5Pexist(lid1,PROP2_NAME);
+ ret = H5Pexist(lid1, PROP2_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check the sizes of the properties */
- ret = H5Pget_size(lid1,PROP1_NAME,&size);
+ ret = H5Pget_size(lid1, PROP1_NAME,&size);
CHECK_I(ret, "H5Pget_size");
VERIFY(size, PROP1_SIZE, "H5Pget_size");
- ret = H5Pget_size(lid1,PROP2_NAME,&size);
+ ret = H5Pget_size(lid1, PROP2_NAME,&size);
CHECK_I(ret, "H5Pget_size");
VERIFY(size, PROP2_SIZE, "H5Pget_size");
/* Check values of properties (set with default values) */
- ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
+ ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
- ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
+ ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
@@ -685,26 +625,18 @@ test_genprop_basic_list_prop(void)
MESSAGE(5, ("Testing Basic Generic Property List Property Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* 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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Create a property list from the class */
lid1 = H5Pcreate(cid1);
@@ -719,17 +651,17 @@ test_genprop_basic_list_prop(void)
/* 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);
+ 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);
+ 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);
+ 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);
+ 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");
@@ -739,20 +671,20 @@ test_genprop_basic_list_prop(void)
VERIFY(nprops, 4, "H5Pget_nprops");
/* Check existence of all properties */
- ret = H5Pexist(lid1,PROP1_NAME);
+ ret = H5Pexist(lid1, PROP1_NAME);
VERIFY(ret, 1, "H5Pexist");
- ret = H5Pexist(lid1,PROP2_NAME);
+ ret = H5Pexist(lid1, PROP2_NAME);
VERIFY(ret, 1, "H5Pexist");
- ret = H5Pexist(lid1,PROP3_NAME);
+ ret = H5Pexist(lid1, PROP3_NAME);
VERIFY(ret, 1, "H5Pexist");
- ret = H5Pexist(lid1,PROP4_NAME);
+ ret = H5Pexist(lid1, PROP4_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check values of permanent properties (set with default values) */
- ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
+ ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
- ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
+ ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
@@ -761,11 +693,11 @@ test_genprop_basic_list_prop(void)
/* Check values of temporary properties (set with regular values) */
- ret = H5Pget(lid1,PROP3_NAME,&prop3_value);
+ ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
CHECK_I(ret, "H5Pget");
- if(HDmemcmp(&prop3_value,PROP3_DEF_VALUE,PROP3_SIZE)!=0)
+ if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
- ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
+ ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
@@ -773,7 +705,7 @@ test_genprop_basic_list_prop(void)
"H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Delete permanent property */
- ret = H5Premove(lid1,PROP2_NAME);
+ ret = H5Premove(lid1, PROP2_NAME);
CHECK_I(ret, "H5Premove");
/* Check number of properties */
@@ -782,7 +714,7 @@ test_genprop_basic_list_prop(void)
VERIFY(nprops, 3, "H5Pget_nprops");
/* Delete temporary property */
- ret = H5Premove(lid1,PROP3_NAME);
+ ret = H5Premove(lid1, PROP3_NAME);
CHECK_I(ret, "H5Premove");
/* Check number of properties */
@@ -791,18 +723,18 @@ test_genprop_basic_list_prop(void)
VERIFY(nprops, 2, "H5Pget_nprops");
/* Check existence of remaining properties */
- ret = H5Pexist(lid1,PROP1_NAME);
+ ret = H5Pexist(lid1, PROP1_NAME);
VERIFY(ret, 1, "H5Pexist");
- ret = H5Pexist(lid1,PROP4_NAME);
+ ret = H5Pexist(lid1, PROP4_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check values of permanent properties (set with default values) */
- ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
+ ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
/* Check values of temporary properties (set with regular values) */
- ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
+ ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
@@ -867,26 +799,18 @@ test_genprop_list_iter(void)
MESSAGE(5, ("Testing Generic Property List Iteration Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* 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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Create a property list from the class */
lid1 = H5Pcreate(cid1);
@@ -901,17 +825,17 @@ test_genprop_list_iter(void)
/* 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);
+ 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);
+ 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);
+ 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);
+ 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");
@@ -1141,40 +1065,24 @@ test_genprop_list_callback(void)
MESSAGE(5, ("Testing Basic Generic Property List Property Callback Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,test_genprop_cls_cb2,&cop_cb_struct,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL,test_genprop_cls_cb2,&cop_cb_struct,NULL, NULL);
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");
+ ret = H5Pregister2(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);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL,test_genprop_prop_del_cb2,NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP4_NAME, PROP4_SIZE, PROP4_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Check the number of properties in class */
ret = H5Pget_nprops(cid1,&nprops);
@@ -1195,16 +1103,16 @@ test_genprop_list_callback(void)
/* Verify creation callback information for properties tracked */
VERIFY(prop1_cb_info.crt_count, 1, "H5Pcreate");
- if(HDstrcmp(prop1_cb_info.crt_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.crt_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.crt_value,PROP1_DEF_VALUE,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.crt_value, PROP1_DEF_VALUE, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Check values of permanent properties (set with default values) */
- ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
+ ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
- ret = H5Pget(lid1,PROP2_NAME,&prop2_value);
+ ret = H5Pget(lid1, PROP2_NAME,&prop2_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
@@ -1212,11 +1120,11 @@ test_genprop_list_callback(void)
"H5Pget", *PROP2_DEF_VALUE, prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
- ret = H5Pget(lid1,PROP3_NAME,&prop3_value);
+ ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
CHECK_I(ret, "H5Pget");
- if(HDmemcmp(&prop3_value,PROP3_DEF_VALUE,PROP3_SIZE)!=0)
+ if(HDmemcmp(&prop3_value, PROP3_DEF_VALUE, PROP3_SIZE)!=0)
TestErrPrintf("Property #3 doesn't match!, line=%d\n",__LINE__);
- ret = H5Pget(lid1,PROP4_NAME,&prop4_value);
+ ret = H5Pget(lid1, PROP4_NAME,&prop4_value);
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!FLT_ABS_EQUAL(prop4_value,*PROP4_DEF_VALUE))
@@ -1226,46 +1134,46 @@ test_genprop_list_callback(void)
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if(HDstrcmp(prop1_cb_info.get_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.get_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.get_value,PROP1_DEF_VALUE,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.get_value, PROP1_DEF_VALUE, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Set value of property #1 to different value */
- ret = H5Pset(lid1,PROP1_NAME,&prop1_new_value);
+ ret = H5Pset(lid1, PROP1_NAME,&prop1_new_value);
CHECK_I(ret, "H5Pset");
/* Verify set callback information for properties tracked */
VERIFY(prop1_cb_info.set_count, 1, "H5Pset");
VERIFY(prop1_cb_info.set_plist_id, lid1, "H5Pset");
- if(HDstrcmp(prop1_cb_info.set_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.set_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.set_value,&prop1_new_value,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.set_value,&prop1_new_value, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Check new value of tracked properties */
- ret = H5Pget(lid1,PROP1_NAME,&prop1_value);
+ ret = H5Pget(lid1, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, prop1_new_value, "H5Pget");
/* Verify get callback information again for properties tracked */
VERIFY(prop1_cb_info.get_count, 2, "H5Pget");
VERIFY(prop1_cb_info.get_plist_id, lid1, "H5Pget");
- if(HDstrcmp(prop1_cb_info.get_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.get_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.get_value,&prop1_new_value,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.get_value,&prop1_new_value, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Delete property #2 */
- ret = H5Premove(lid1,PROP2_NAME);
+ ret = H5Premove(lid1, PROP2_NAME);
CHECK_I(ret, "H5Premove");
/* Verify delete callback information for properties tracked */
VERIFY(prop2_cb_info.del_count, 1, "H5Premove");
VERIFY(prop2_cb_info.del_plist_id, lid1, "H5Premove");
- if(HDstrcmp(prop2_cb_info.del_name,PROP2_NAME)!=0)
+ if(HDstrcmp(prop2_cb_info.del_name, PROP2_NAME)!=0)
TestErrPrintf("Property #2 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop2_cb_info.del_value,PROP2_DEF_VALUE,PROP2_SIZE)!=0)
+ if(HDmemcmp(prop2_cb_info.del_value, PROP2_DEF_VALUE, PROP2_SIZE)!=0)
TestErrPrintf("Property #2 value doesn't match!, line=%d\n",__LINE__);
/* Copy first list */
@@ -1274,9 +1182,9 @@ test_genprop_list_callback(void)
/* Verify copy callback information for properties tracked */
VERIFY(prop1_cb_info.cop_count, 1, "H5Pcopy");
- if(HDstrcmp(prop1_cb_info.cop_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.cop_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.cop_value,&prop1_new_value,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.cop_value,&prop1_new_value, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Verify that the class creation callback occurred */
@@ -1298,9 +1206,9 @@ test_genprop_list_callback(void)
/* Verify close callback information for properties tracked */
VERIFY(prop1_cb_info.cls_count, 1, "H5Pclose");
- if(HDstrcmp(prop1_cb_info.cls_name,PROP1_NAME)!=0)
+ if(HDstrcmp(prop1_cb_info.cls_name, PROP1_NAME)!=0)
TestErrPrintf("Property #1 name doesn't match!, line=%d\n",__LINE__);
- if(HDmemcmp(prop1_cb_info.cls_value,&prop1_new_value,PROP1_SIZE)!=0)
+ if(HDmemcmp(prop1_cb_info.cls_value,&prop1_new_value, PROP1_SIZE)!=0)
TestErrPrintf("Property #1 value doesn't match!, line=%d\n",__LINE__);
/* Close second list */
@@ -1367,11 +1275,11 @@ test_genprop_list_addprop(void)
CHECK_I(ret, "H5Pinsert");
/* Check existence of added property */
- ret = H5Pexist(pid,PROP1_NAME);
+ ret = H5Pexist(pid, PROP1_NAME);
VERIFY(ret, 1, "H5Pexist");
/* Check values of property (set with default value) */
- ret = H5Pget(pid,PROP1_NAME,&prop1_value);
+ ret = H5Pget(pid, PROP1_NAME,&prop1_value);
CHECK_I(ret, "H5Pget");
VERIFY(prop1_value, *PROP1_DEF_VALUE, "H5Pget");
@@ -1434,7 +1342,7 @@ test_genprop_class_addprop(void)
CHECK(sid, FAIL, "H5Screate");
/* Create a new class, dervied from the dataset creation property list class */
- cid = H5Pcreate_class(H5P_DATASET_CREATE,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid = H5Pcreate_class(H5P_DATASET_CREATE,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
CHECK_I(cid, "H5Pcreate_class");
/* Check existence of an original property */
@@ -1442,12 +1350,8 @@ 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");
+ ret = H5Pregister2(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Create a derived dataset creation property list */
pid = H5Pcreate(cid);
@@ -1519,24 +1423,16 @@ test_genprop_equal(void)
MESSAGE(5, ("Testing Basic Generic Property List Equal Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* 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");
+ ret = H5Pregister2(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Create a property list from the class */
lid1 = H5Pcreate(cid1);
@@ -1575,16 +1471,12 @@ test_genprop_path(void)
MESSAGE(5, ("Testing Generic Property List Class Path Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Get full path for first class */
path=H5P_get_class_path_test(cid1);
@@ -1594,16 +1486,12 @@ test_genprop_path(void)
HDfree(path);
/* Create another new generic class, derived from first class */
- cid2 = H5Pcreate_class(cid1,CLASS2_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid2 = H5Pcreate_class(cid1,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
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");
+ ret = H5Pregister2(cid2, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Get full path for second class */
path=H5P_get_class_path_test(cid2);
@@ -1654,16 +1542,12 @@ test_genprop_refcount(void)
MESSAGE(5, ("Testing Generic Property List Reference Count Functionality\n"));
/* Create a new generic class, derived from the root of the class hierarchy */
- cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME,NULL,NULL,NULL,NULL,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_ROOT,CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
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");
+ ret = H5Pregister2(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister2");
/* Create a new generic list, derived from the root of the class hierarchy */
lid1 = H5Pcreate(cid1);
@@ -1712,6 +1596,136 @@ test_genprop_refcount(void)
} /* ent test_genprop_refcount() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+/****************************************************************
+**
+** test_genprop_deprec(): Test basic generic property list code.
+** Tests deprecated API routines.
+**
+****************************************************************/
+static void
+test_genprop_deprec(void)
+{
+ hid_t cid1; /* Generic Property class ID */
+ size_t size; /* Size of property */
+ size_t nprops; /* Number of properties in class */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Deprecated Generic Property List Functions\n"));
+
+ /* Create a new generic class, derived from the root of the class hierarchy */
+ cid1 = H5Pcreate_class(H5P_ROOT, CLASS1_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(cid1, "H5Pcreate_class");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 0, "H5Pget_nprops");
+
+ /* Check the existance of the first property (should fail) */
+ ret = H5Pexist(cid1, PROP1_NAME);
+ VERIFY(ret, 0, "H5Pexist");
+
+ /* Insert first property into class (with no callbacks) */
+ ret = H5Pregister1(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister1");
+
+ /* Try to insert the first property again (should fail) */
+ ret = H5Pregister1(cid1, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
+ VERIFY(ret, FAIL, "H5Pregister1");
+
+ /* Check the existance of the first property */
+ ret = H5Pexist(cid1, PROP1_NAME);
+ VERIFY(ret, 1, "H5Pexist");
+
+ /* Check the size of the first property */
+ ret = H5Pget_size(cid1, PROP1_NAME, &size);
+ CHECK_I(ret, "H5Pget_size");
+ VERIFY(size, PROP1_SIZE, "H5Pget_size");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 1, "H5Pget_nprops");
+
+ /* Insert second property into class (with no callbacks) */
+ ret = H5Pregister1(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister1");
+
+ /* Try to insert the second property again (should fail) */
+ ret = H5Pregister1(cid1, PROP2_NAME, PROP2_SIZE, PROP2_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
+ VERIFY(ret, FAIL, "H5Pregister1");
+
+ /* Check the existance of the second property */
+ ret = H5Pexist(cid1, PROP2_NAME);
+ VERIFY(ret, 1, "H5Pexist");
+
+ /* Check the size of the second property */
+ ret = H5Pget_size(cid1, PROP2_NAME, &size);
+ CHECK_I(ret, "H5Pget_size");
+ VERIFY(size, PROP2_SIZE, "H5Pget_size");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 2, "H5Pget_nprops");
+
+ /* Insert third property into class (with no callbacks) */
+ ret = H5Pregister1(cid1, PROP3_NAME, PROP3_SIZE, PROP3_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL);
+ CHECK_I(ret, "H5Pregister1");
+
+ /* Check the existance of the third property */
+ ret = H5Pexist(cid1, PROP3_NAME);
+ VERIFY(ret, 1, "H5Pexist");
+
+ /* Check the size of the third property */
+ ret = H5Pget_size(cid1, PROP3_NAME, &size);
+ CHECK_I(ret, "H5Pget_size");
+ VERIFY(size, PROP3_SIZE, "H5Pget_size");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 3, "H5Pget_nprops");
+
+ /* Unregister first property */
+ ret = H5Punregister(cid1, PROP1_NAME);
+ CHECK_I(ret, "H5Punregister");
+
+ /* Try to check the size of the first property (should fail) */
+ ret = H5Pget_size(cid1, PROP1_NAME, &size);
+ VERIFY(ret, FAIL, "H5Pget_size");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 2, "H5Pget_nprops");
+
+ /* Unregister second property */
+ ret = H5Punregister(cid1, PROP2_NAME);
+ CHECK_I(ret, "H5Punregister");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 1, "H5Pget_nprops");
+
+ /* Unregister third property */
+ ret = H5Punregister(cid1, PROP3_NAME);
+ CHECK_I(ret, "H5Punregister");
+
+ /* Check the number of properties in class */
+ ret = H5Pget_nprops(cid1, &nprops);
+ CHECK_I(ret, "H5Pget_nprops");
+ VERIFY(nprops, 0, "H5Pget_nprops");
+
+ /* Close class */
+ ret = H5Pclose_class(cid1);
+ CHECK_I(ret, "H5Pclose_class");
+} /* end test_genprop_deprec() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
/****************************************************************
**
** test_genprop(): Main generic property testing routine.
@@ -1741,6 +1755,10 @@ test_genprop(void)
test_genprop_path(); /* Tests for class path verification */
test_genprop_refcount(); /* Tests for class reference counting */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+ test_genprop_deprec(); /* Tests for deprecated routines */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
} /* test_genprop() */