summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2001-10-03 17:57:56 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2001-10-03 17:57:56 (GMT)
commite3a137f39e80b6fe7271f18d2009865823f95f43 (patch)
tree8f16768f0622101ebb308a824560fc16e73732a0 /test
parent7666ce56d350ee6e65af4736ae3455916a86aadd (diff)
downloadhdf5-e3a137f39e80b6fe7271f18d2009865823f95f43.zip
hdf5-e3a137f39e80b6fe7271f18d2009865823f95f43.tar.gz
hdf5-e3a137f39e80b6fe7271f18d2009865823f95f43.tar.bz2
[svn-r4517]
Purpose: Changed to the new generic property list for dataset creation property list. Platforms tested: Arabica, modi4 and Hawkwind
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c4
-rw-r--r--test/extend.c2
-rw-r--r--test/external.c18
-rw-r--r--test/tgenprop.c15
4 files changed, 26 insertions, 13 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 6716e02..1c2956a 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -388,7 +388,7 @@ test_compression(hid_t file)
if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error;
/* Use chunked storage with compression */
- if ((dc = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
+ if((dc = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (dc, 2, chunk_size)<0) goto error;
if (H5Pset_deflate (dc, 6)<0) goto error;
@@ -678,7 +678,7 @@ test_multiopen (hid_t file)
TESTING("multi-open with extending");
/* Create the dataset and open it twice */
- if ((dcpl=H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (dcpl, 1, cur_size)<0) goto error;
if ((space=H5Screate_simple (1, cur_size, max_size))<0) goto error;
if ((dset1=H5Dcreate (file, "multiopen", H5T_NATIVE_INT, space,
diff --git a/test/extend.c b/test/extend.c
index 9ae8489..128985f 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -69,7 +69,7 @@ main (void)
}
/* Create the dataset which is originally NX by NY */
- if ((cparms = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
+ if((cparms = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_chunk (cparms, 2, chunk_dims)<0) goto error;
if ((dataset = H5Dcreate (file, "dataset", H5T_NATIVE_INT, mem_space,
cparms))<0) goto error;
diff --git a/test/external.c b/test/external.c
index e9766a4..ce1afe0 100644
--- a/test/external.c
+++ b/test/external.c
@@ -96,7 +96,7 @@ test_1a(hid_t file)
TESTING("fixed-size data space, exact storage");
/* Create the dataset */
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)))<0) goto error;
@@ -175,7 +175,7 @@ test_1b(hid_t file)
hsize_t max_size[1]; /*maximum data space size */
TESTING("external storage is too small");
- if ((dcpl = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)-1))<0) goto error;
@@ -231,7 +231,7 @@ test_1c(hid_t file)
hsize_t max_size[1]; /*maximum data space size */
TESTING("extendible dataspace, exact external size");
- if ((dcpl=H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = 100;
max_size[0] = 200;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
@@ -282,7 +282,7 @@ test_1d(hid_t file)
hsize_t max_size[1]; /*maximum data space size */
TESTING("extendible dataspace, external storage is too small");
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = 100;
max_size[0] = 200;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
@@ -344,7 +344,7 @@ test_1e(hid_t file)
TESTING("unlimited dataspace, unlimited external storage");
/* Create dataset */
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED)<0) goto error;
cur_size[0] = 100;
max_size[0] = H5S_UNLIMITED;
@@ -421,7 +421,7 @@ test_1f(hid_t file)
hsize_t max_size[1]; /*data space maximum size */
TESTING("multiple external files");
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)/4))<0) goto error;
@@ -527,7 +527,7 @@ test_1h(void)
herr_t status; /*return status */
TESTING("address overflow in external files");
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1)<0) goto error;
H5E_BEGIN_TRY {
status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
@@ -616,7 +616,7 @@ test_2 (hid_t fapl)
if (H5Gclose(grp)<0) goto error;
/* Create the dataset */
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_external (dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part)<0 ||
H5Pset_external (dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part)<0 ||
H5Pset_external (dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part)<0 ||
@@ -720,7 +720,7 @@ test_3 (hid_t fapl)
}
/* Create the external file list */
- if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
if (H5Pset_external(dcpl, "extern_1b.raw", (off_t)0, (hsize_t)sizeof part)<0 ||
H5Pset_external(dcpl, "extern_2b.raw", (off_t)10, (hsize_t)sizeof part)<0 ||
H5Pset_external(dcpl, "extern_3b.raw", (off_t)20, (hsize_t)sizeof part)<0 ||
diff --git a/test/tgenprop.c b/test/tgenprop.c
index 1a0b75f..ae906b2 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -380,6 +380,19 @@ test_genprop_cls_cb1(hid_t list_id, void *create_data)
return(SUCCEED);
}
+static herr_t
+test_genprop_cls_cb2(hid_t new_list_id, hid_t old_list_id, void *create_data)
+{
+ struct { /* Struct for iterations */
+ int count;
+ hid_t id;
+ } *count_struct=create_data;
+
+ count_struct->count++;
+ count_struct->id=new_list_id;
+
+ return(SUCCEED);
+}
/****************************************************************
**
** test_genprop_class_callback(): Test basic generic property list code.
@@ -998,7 +1011,7 @@ 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_NO_CLASS_NEW,CLASS1_NAME,CLASS1_HASHSIZE,NULL,NULL,test_genprop_cls_cb1,&cop_cb_struct,NULL,NULL);
+ cid1 = H5Pcreate_class(H5P_NO_CLASS_NEW,CLASS1_NAME,CLASS1_HASHSIZE,NULL,NULL,test_genprop_cls_cb2,&cop_cb_struct,NULL,NULL);
CHECK_I(cid1, "H5Pcreate_class");
/* Insert first property into class (with callbacks) */