summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in6
-rw-r--r--test/cmpd_dset.c28
-rw-r--r--test/dsets.c14
-rw-r--r--test/dspace.c2
-rw-r--r--test/extend.c14
-rw-r--r--test/th5s.c (renamed from test/th5p.c)52
6 files changed, 58 insertions, 58 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 76cc68d..3c61e91 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -16,17 +16,17 @@ TESTS=$(PROGS)
# Temporary files
MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \
- tfile3.h5 th5p1.h5 theap.h5 tohdr.h5 tstab1.h5 tstab2.h5
+ tfile3.h5 th5s1.h5 theap.h5 tohdr.h5 tstab1.h5 tstab2.h5
# Source and object files for programs... The PROG_SRC list contains all the
# source files and is used for things like dependencies, archiving, etc. The
# other source lists are for the individual tests, the files of which may
# overlap with other tests.
-PROG_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5p.c dtypes.c \
+PROG_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5s.c dtypes.c \
hyperslab.c istore.c dsets.c cmpd_dset.c extend.c
PROG_OBJ=$(PROG_SRC:.c=.o)
-TESTHDF5_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5p.c
+TESTHDF5_SRC=testhdf5.c tfile.c theap.c tmeta.c tohdr.c tstab.c th5s.c
TESTHDF5_OBJ=$(TESTHDF5_SRC:.c=.o)
DSETS_SRC=dsets.c
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 6ad4b31..aad6339 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -134,7 +134,7 @@ main (void)
assert (file>=0);
/* Create the data space */
- space = H5Pcreate_simple (2, dim, NULL);
+ space = H5Screate_simple (2, dim, NULL);
assert (space>=0);
@@ -170,7 +170,7 @@ STEP 1: Initialize dataset `s1' and store it on disk in native order.\n");
assert (dataset>=0);
/* Write the data */
- status = H5Dwrite (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dwrite (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/*
@@ -195,7 +195,7 @@ STEP 2: Read the dataset from disk into a new memory buffer which has the\n\
assert (s2_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s2_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s2);
+ status = H5Dread (dataset, s2_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s2);
assert (status>=0);
/* Compare s2 with s1. They should be the same */
@@ -227,7 +227,7 @@ STEP 3: Read the dataset again with members in a different order.\n");
assert (s3_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s3_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s3);
+ status = H5Dread (dataset, s3_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s3);
assert (status>=0);
/* Compare s3 with s1. They should be the same */
@@ -255,7 +255,7 @@ STEP 4: Read a subset of the members.\n");
assert (s4_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s4_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s4);
+ status = H5Dread (dataset, s4_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s4);
assert (status>=0);
/* Compare s4 with s1 */
@@ -291,7 +291,7 @@ STEP 5: Read members into a superset which is partially initialized.\n");
assert (s5_tid>=0);
/* Read the data */
- status = H5Dread (dataset, s5_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s5);
+ status = H5Dread (dataset, s5_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s5);
assert (status>=0);
/* Check that the data was read properly */
@@ -329,11 +329,11 @@ STEP 6: Update fields `b' and `d' on the file, leaving the other fields\n\
}
/* Write the data to file */
- status = H5Dwrite (dataset, s4_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s4);
+ status = H5Dwrite (dataset, s4_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s4);
assert (status>=0);
/* Read the data back */
- status = H5Dread (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dread (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/* Compare */
@@ -356,11 +356,11 @@ STEP 7: Reading original dataset with explicit data space.\n");
fflush (stdout);
/* Create the data space */
- s7_sid = H5Pcreate_simple (2, dim, NULL);
+ s7_sid = H5Screate_simple (2, dim, NULL);
assert (s7_sid>=0);
/* Read the dataset */
- status = H5Dread (dataset, s2_tid, s7_sid, H5P_ALL, H5C_DEFAULT, s2);
+ status = H5Dread (dataset, s2_tid, s7_sid, H5S_ALL, H5C_DEFAULT, s2);
assert (status>=0);
/* Compare */
@@ -391,11 +391,11 @@ STEP 8: Read middle third hyperslab into memory array.\n");
h_size[1] = 2*NY/3 - f_offset[1];
h_sample[0] = 1;
h_sample[1] = 1;
- status = H5Pset_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
+ status = H5Sset_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
assert (status>=0);
/* Create memory data space */
- s8_m_sid = H5Pcreate_simple (2, h_size, NULL);
+ s8_m_sid = H5Screate_simple (2, h_size, NULL);
assert (s8_m_sid>=0);
/* Read the dataset */
@@ -518,7 +518,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\
fflush (stdout);
/* Create the memory array and initialize all fields to zero */
- ndims = H5Pget_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
+ ndims = H5Sget_hyperslab (s8_f_sid, f_offset, h_size, h_sample);
assert (ndims==2);
s11 = malloc (h_size[0]*h_size[1]*sizeof(s4_t));
assert (s11);
@@ -529,7 +529,7 @@ STEP 11: Write an array back to the middle third of the dataset to\n\
assert (status>=0);
/* Read the whole thing */
- status = H5Dread (dataset, s1_tid, H5P_ALL, H5P_ALL, H5C_DEFAULT, s1);
+ status = H5Dread (dataset, s1_tid, H5S_ALL, H5S_ALL, H5C_DEFAULT, s1);
assert (status>=0);
/* Compare */
diff --git a/test/dsets.c b/test/dsets.c
index 8261103..16cd541 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -57,7 +57,7 @@ test_create(hid_t file)
/* Create the data space */
dims[0] = 256;
dims[1] = 512;
- space = H5Pcreate_simple(2, dims, NULL);
+ space = H5Screate_simple(2, dims, NULL);
assert(space != FAIL);
/*
@@ -209,7 +209,7 @@ test_simple_io(hid_t file)
/* Create the data space */
dims[0] = 100;
dims[1] = 200;
- space = H5Pcreate_simple(2, dims, NULL);
+ space = H5Screate_simple(2, dims, NULL);
assert(space != FAIL);
/* Create the dataset */
@@ -218,7 +218,7 @@ test_simple_io(hid_t file)
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5C_DEFAULT, points);
if (status < 0) {
puts("*FAILED*");
@@ -229,7 +229,7 @@ test_simple_io(hid_t file)
goto error;
}
/* Read the dataset back */
- status = H5Dread(dataset, H5T_NATIVE_INT, H5P_ALL, H5P_ALL,
+ status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,
H5C_DEFAULT, check);
if (status < 0) {
puts("*FAILED*");
@@ -301,7 +301,7 @@ test_tconv(hid_t file)
/* Create the data space */
dims[0] = 1000000;
- space = H5Pcreate_simple (1, dims, NULL);
+ space = H5Screate_simple (1, dims, NULL);
assert(space != FAIL);
/* Create the data set */
@@ -310,7 +310,7 @@ test_tconv(hid_t file)
assert(dataset >= 0);
/* Write the data to the dataset */
- status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5P_ALL, H5P_ALL,
+ status = H5Dwrite(dataset, H5T_NATIVE_INT32, H5S_ALL, H5S_ALL,
H5C_DEFAULT, out);
if (status<0) H5Eprint (H5E_thrdid_g, stdout);
assert(status >= 0);
@@ -330,7 +330,7 @@ test_tconv(hid_t file)
}
/* Read data with byte order conversion */
- status = H5Dread(dataset, type, H5P_ALL, H5P_ALL, H5C_DEFAULT, in);
+ status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5C_DEFAULT, in);
assert(status >= 0);
/* Check */
diff --git a/test/dspace.c b/test/dspace.c
index 54fa17f..e833995 100644
--- a/test/dspace.c
+++ b/test/dspace.c
@@ -5,7 +5,7 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, December 9, 1997
*
- * Purpose: Tests the data space interface (H5P).
+ * Purpose: Tests the data space interface (H5S).
*/
int
diff --git a/test/extend.c b/test/extend.c
index 7de127e..a3562fa 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -40,7 +40,7 @@ main (void)
static const size_t dims[2] = {NX, NY};
static const size_t half_dims[2] = {NX/2, NY/2};
static const size_t chunk_dims[2] = {NX/2, NY/2};
- static size_t maxdims[2] = {H5P_UNLIMITED, H5P_UNLIMITED};
+ static size_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
static size_t size[2];
int offset[2];
@@ -50,7 +50,7 @@ main (void)
buf1[i][j] = i*NY+j;
}
}
- mem_space = H5Pcreate_simple (2, dims, maxdims);
+ mem_space = H5Screate_simple (2, dims, maxdims);
assert (mem_space>=0);
/* Create the file */
@@ -80,21 +80,21 @@ main (void)
/* Select a hyperslab */
file_space = H5Dget_space (dataset);
assert (file_space>=0);
- status = H5Pset_hyperslab (file_space, offset, dims, NULL);
+ status = H5Sset_hyperslab (file_space, offset, dims, NULL);
assert (status>=0);
/* Write to the hyperslab */
status = H5Dwrite (dataset, H5T_NATIVE_INT, mem_space, file_space,
H5C_DEFAULT, buf1);
assert (status>=0);
- H5Pclose (file_space);
+ H5Sclose (file_space);
}
}
- H5Pclose (mem_space);
+ H5Sclose (mem_space);
/* Read the data */
- mem_space = H5Pcreate_simple (2, half_dims, NULL);
+ mem_space = H5Screate_simple (2, half_dims, NULL);
file_space = H5Dget_space (dataset);
for (i=0; i<10; i++) {
for (j=0; j<10; j++) {
@@ -103,7 +103,7 @@ main (void)
offset[0] = i * NX/2;
offset[1] = j * NY/2;
assert (file_space>=0);
- status = H5Pset_hyperslab (file_space, offset, half_dims, NULL);
+ status = H5Sset_hyperslab (file_space, offset, half_dims, NULL);
assert (status>=0);
/* Read */
diff --git a/test/th5p.c b/test/th5s.c
index e856e3c..faafd5e 100644
--- a/test/th5p.c
+++ b/test/th5s.c
@@ -29,7 +29,7 @@ static char RcsId[] = "$Revision$";
#include <H5private.h>
#include <H5Bprivate.h>
#include <H5Mprivate.h>
-#include <H5Pprivate.h>
+#include <H5Sprivate.h>
#define FILE "th5p1.h5"
@@ -50,7 +50,7 @@ static char RcsId[] = "$Revision$";
/****************************************************************
**
-** test_h5p_basic(): Test basic H5P (dataspace) code.
+** test_h5p_basic(): Test basic H5S (dataspace) code.
**
****************************************************************/
static void
@@ -73,35 +73,35 @@ test_h5p_basic(void)
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT);
CHECK(fid1, FAIL, "H5Fcreate");
- sid1 = H5Pcreate_simple(SPACE1_RANK, dims1, NULL);
- CHECK(sid1, FAIL, "H5Pcreate_simple");
+ sid1 = H5Screate_simple(SPACE1_RANK, dims1, NULL);
+ CHECK(sid1, FAIL, "H5Screate_simple");
- n = H5Pget_npoints(sid1);
- CHECK(n, UFAIL, "H5Pget_npoints");
- VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Pget_npoints");
+ n = H5Sget_npoints(sid1);
+ CHECK(n, UFAIL, "H5Sget_npoints");
+ VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3, "H5Sget_npoints");
- rank = H5Pget_ndims(sid1);
- CHECK(rank, UFAIL, "H5Pget_lrank");
- VERIFY(rank, SPACE1_RANK, "H5Pget_lrank");
+ rank = H5Sget_ndims(sid1);
+ CHECK(rank, UFAIL, "H5Sget_lrank");
+ VERIFY(rank, SPACE1_RANK, "H5Sget_lrank");
- ret = H5Pget_dims(sid1, tdims);
- CHECK(ret, FAIL, "H5Pget_ldims");
- VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Pget_ldims");
+ ret = H5Sget_dims(sid1, tdims);
+ CHECK(ret, FAIL, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
- sid2 = H5Pcreate_simple(SPACE2_RANK, dims2, NULL);
- CHECK(sid2, FAIL, "H5Pcreate_simple");
+ sid2 = H5Screate_simple(SPACE2_RANK, dims2, NULL);
+ CHECK(sid2, FAIL, "H5Screate_simple");
- n = H5Pget_npoints(sid2);
- CHECK(n, UFAIL, "H5Pnelem");
- VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, "H5Pnelem");
+ n = H5Sget_npoints(sid2);
+ CHECK(n, UFAIL, "H5Snelem");
+ VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4, "H5Snelem");
- rank = H5Pget_ndims(sid2);
- CHECK(rank, UFAIL, "H5Pget_lrank");
- VERIFY(rank, SPACE2_RANK, "H5Pget_lrank");
+ rank = H5Sget_ndims(sid2);
+ CHECK(rank, UFAIL, "H5Sget_lrank");
+ VERIFY(rank, SPACE2_RANK, "H5Sget_lrank");
- ret = H5Pget_dims(sid2, tdims);
- CHECK(ret, FAIL, "H5Pget_ldims");
- VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(uint32)), 0, "H5Pget_ldims");
+ ret = H5Sget_dims(sid2, tdims);
+ CHECK(ret, FAIL, "H5Sget_ldims");
+ VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(uint32)), 0, "H5Sget_ldims");
ret = H5Mclose(sid1);
CHECK(ret, FAIL, "H5Mrelease");
@@ -116,7 +116,7 @@ test_h5p_basic(void)
/****************************************************************
**
-** test_h5p(): Main H5P (dataspace) testing routine.
+** test_h5p(): Main H5S (dataspace) testing routine.
**
****************************************************************/
void
@@ -125,5 +125,5 @@ test_h5p(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspaces\n"));
- test_h5p_basic(); /* Test basic H5P code */
+ test_h5p_basic(); /* Test basic H5S code */
} /* test_h5p() */