summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-15 01:59:24 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-15 01:59:24 (GMT)
commit25520640b2b5db099aaf3509ae76dd07e31ece46 (patch)
treec353ad5006817223dc6e073a010e89ad956e8dc4 /test
parent686dbefff5afe0a7572dccbb74ab826a24e6fcbf (diff)
downloadhdf5-25520640b2b5db099aaf3509ae76dd07e31ece46.zip
hdf5-25520640b2b5db099aaf3509ae76dd07e31ece46.tar.gz
hdf5-25520640b2b5db099aaf3509ae76dd07e31ece46.tar.bz2
Misc normalizations with develop
Diffstat (limited to 'test')
-rw-r--r--test/cache_api.c8
-rw-r--r--test/direct_chunk.c14
-rw-r--r--test/dsets.c34
-rw-r--r--test/tattr.c11
4 files changed, 29 insertions, 38 deletions
diff --git a/test/cache_api.c b/test/cache_api.c
index 1e1a2c9..d6ea7e2 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1664,7 +1664,7 @@ init_invalid_configs(void) {
configs[13].lower_hr_threshold = 1.00000001f;
/* 14 -- increment too small */
- configs[14].increment = H5_DOUBLE(0.999999999999);
+ configs[14].increment = 0.999999999999;
/* 15 -- invalid flash_incr_mode */
configs[15].flash_incr_mode = (enum H5C_cache_flash_incr_mode)-1;
@@ -1697,7 +1697,7 @@ init_invalid_configs(void) {
/* 23 -- decrement too big */
configs[23].decr_mode = H5C_decr__threshold;
- configs[23].decrement = H5_DOUBLE(1.0000000001);
+ configs[23].decrement = 1.0000000001;
/* 24 -- epochs_before_eviction too small */
configs[24].epochs_before_eviction = 0;
@@ -1709,13 +1709,13 @@ init_invalid_configs(void) {
configs[26].empty_reserve = -0.0000000001f;
/* 27 -- empty_reserve too big */
- configs[27].empty_reserve = H5_DOUBLE(1.00000000001);
+ configs[27].empty_reserve = 1.00000000001;
/* 28 -- upper_hr_threshold too small */
configs[28].upper_hr_threshold = -0.000000001f;
/* 29 -- upper_hr_threshold too big */
- configs[29].upper_hr_threshold = H5_DOUBLE(1.00000001);
+ configs[29].upper_hr_threshold = 1.00000001;
/* 30 -- upper_hr_threshold <= lower_hr_threshold */
configs[30].lower_hr_threshold = 0.9f;
diff --git a/test/direct_chunk.c b/test/direct_chunk.c
index 7b17043..2e6cc68 100644
--- a/test/direct_chunk.c
+++ b/test/direct_chunk.c
@@ -43,7 +43,7 @@
#define CHUNK_NX 4
#define CHUNK_NY 4
-#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*H5_DOUBLE(1.001))+H5_DOUBLE(12.0))
+#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s))*1.001)+12.0)
/* Temporary filter IDs used for testing */
#define H5Z_FILTER_BOGUS1 305
@@ -661,20 +661,20 @@ filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
size_t *buf_size, void **buf)
{
int *int_ptr=(int *)*buf; /* Pointer to the data values */
- ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
+ size_t buf_left=*buf_size; /* Amount of data buffer left to process */
if(flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ -= (int)ADD_ON;
- buf_left -= (ssize_t)sizeof(int);
+ buf_left -= sizeof(int);
} /* end while */
} /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ += (int)ADD_ON;
- buf_left -= (ssize_t)sizeof(int);
+ buf_left -= sizeof(int);
} /* end while */
} /* end else */
@@ -698,20 +698,20 @@ filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
size_t *buf_size, void **buf)
{
int *int_ptr=(int *)*buf; /* Pointer to the data values */
- ssize_t buf_left=(ssize_t)*buf_size; /* Amount of data buffer left to process */
+ size_t buf_left=*buf_size; /* Amount of data buffer left to process */
if(flags & H5Z_FLAG_REVERSE) { /* read */
/* Substract the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ /= (int)FACTOR;
- buf_left -= (ssize_t)sizeof(int);
+ buf_left -= sizeof(int);
} /* end while */
} /* end if */
else { /* write */
/* Add the "add on" value to all the data values */
while(buf_left>0) {
*int_ptr++ *= (int)FACTOR;
- buf_left -= (ssize_t)sizeof(int);
+ buf_left -= sizeof(int);
} /* end while */
} /* end else */
diff --git a/test/dsets.c b/test/dsets.c
index f7e90a5..d72c65b 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the dataset interface (H5D)
@@ -274,13 +274,6 @@ const char *FILENAME[] = {
#define STORAGE_SIZE_CHUNK_DIM1 5
#define STORAGE_SIZE_CHUNK_DIM2 5
-/* Parameters for testing version bounds */
-#define VDS_FNAME1 "virtual_file1"
-#define VDS_FNAME2 "virtual_file2"
-#define SRC_FNAME "source_file"
-#define SRC_DSET "src_dset"
-#define V_DSET "v_dset"
-
/* Shared global arrays */
#define DSET_DIM1 100
#define DSET_DIM2 200
@@ -3176,18 +3169,18 @@ test_nbit_double(hid_t file)
*/
double orig_data[2][5] = {
{
- H5_DOUBLE(1.6081706885101836e+60),
- H5_DOUBLE(-255.32099170994480),
- H5_DOUBLE(1.2677579992621376e-61),
- H5_DOUBLE(64568.289448797700),
- H5_DOUBLE(-1.0619721778839084e-75)
+ (double)1.6081706885101836e+60L,
+ -255.32099170994480f,
+ (double)1.2677579992621376e-61L,
+ 64568.289448797700f,
+ (double)-1.0619721778839084e-75L
},
{
- H5_DOUBLE(2.1499497833454840e+56),
- H5_DOUBLE(6.6562295504670740e-3),
- H5_DOUBLE(-1.5747263393432150),
- H5_DOUBLE(1.0711093225222612),
- H5_DOUBLE(-9.8971679387636870e-1)
+ (double)2.1499497833454840e+56L,
+ 6.6562295504670740e-3f,
+ -1.5747263393432150f,
+ 1.0711093225222612f,
+ -9.8971679387636870e-1f
}};
double new_data[2][5];
size_t precision, offset;
@@ -13232,6 +13225,11 @@ error:
*
*-------------------------------------------------------------------------
*/
+#define VDS_FNAME1 "virtual_file1"
+#define VDS_FNAME2 "virtual_file2"
+#define SRC_FNAME "source_file"
+#define SRC_DSET "src_dset"
+#define V_DSET "v_dset"
static herr_t
test_versionbounds(void)
{
diff --git a/test/tattr.c b/test/tattr.c
index b11fd0d..2a5e613 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -531,7 +531,7 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!H5_DBL_ABS_EQUAL(rdata, H5_DOUBLE(0.0)))
+ if(!H5_DBL_ABS_EQUAL(rdata, (double)0.0f))
TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,(double)0.0F);
ret=H5Fflush(fil, H5F_SCOPE_GLOBAL);
@@ -540,7 +540,7 @@ test_attr_flush(hid_t fapl)
ret=H5Aread(att, H5T_NATIVE_DOUBLE, &rdata);
CHECK(ret, FAIL, "H5Awrite");
- if(!H5_DBL_ABS_EQUAL(rdata, H5_DOUBLE(0.0)))
+ if(!H5_DBL_ABS_EQUAL(rdata, (double)0.0f))
TestErrPrintf("attribute value wrong: rdata=%f, should be %f\n",rdata,(double)0.0F);
ret=H5Awrite(att, H5T_NATIVE_DOUBLE, &wdata);
@@ -6560,13 +6560,6 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info,
char attrname[NAME_BUF_SIZE]; /* Object name */
H5A_info_t my_info; /* Local attribute info */
-#ifdef QAK
-HDfprintf(stderr, "attr_name = '%s'\n", attr_name);
-if(info)
- HDfprintf(stderr, "info->corder = %u\n", (unsigned)info->corder);
-HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
-#endif /* QAK */
-
/* Increment # of times the callback was called */
op_data->ncalled++;