summaryrefslogtreecommitdiffstats
path: root/test/timer.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-07 16:45:05 (GMT)
committerGitHub <noreply@github.com>2021-05-07 16:45:05 (GMT)
commit9023e98940d959aa974e655cc383fab0b0ed663c (patch)
tree8cad5bb35e1385c7a267319f4baf688d0efade63 /test/timer.c
parent1e572b18e3c271f9de045a6b61e3c855779e7c58 (diff)
downloadhdf5-9023e98940d959aa974e655cc383fab0b0ed663c.zip
hdf5-9023e98940d959aa974e655cc383fab0b0ed663c.tar.gz
hdf5-9023e98940d959aa974e655cc383fab0b0ed663c.tar.bz2
Removes gratuitous (double)x.yF casts (#632)
* Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/timer.c')
-rw-r--r--test/timer.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/timer.c b/test/timer.c
index 24f3245..bb474ca 100644
--- a/test/timer.c
+++ b/test/timer.c
@@ -144,7 +144,7 @@ test_timer_system_user(void)
/* The system and user times may not be present on some systems. They
* will be -1.0 if they are not.
*/
- if (timer.initial.system < (double)0.0f || timer.initial.user < (double)0.0f) {
+ if (timer.initial.system < 0.0 || timer.initial.user < 0.0) {
SKIPPED();
HDprintf("NOTE: No suitable way to get system/user times on this platform.\n");
return 0;
@@ -165,7 +165,7 @@ test_timer_system_user(void)
TEST_ERROR;
/* System and user times should be non-negative. */
- if (times.system < (double)0.0f || times.user < (double)0.0f)
+ if (times.system < 0.0 || times.user < 0.0)
TEST_ERROR;
PASSED();
@@ -224,7 +224,7 @@ test_timer_elapsed(void)
TEST_ERROR;
/* Elapsed time should be non-negative. */
- if (times.elapsed < (double)0.0f)
+ if (times.elapsed < 0.0)
TEST_ERROR;
PASSED();
@@ -260,11 +260,11 @@ test_timer_functionality(void)
/* Times should be initialized to zero */
err = H5_timer_get_times(timer, &times);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
err = H5_timer_get_total_times(timer, &times);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
/********************
@@ -289,11 +289,11 @@ test_timer_functionality(void)
/* Times should be positive and non-negative */
err = H5_timer_get_times(timer, &times);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
err = H5_timer_get_total_times(timer, &times);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
/**********************
@@ -306,11 +306,11 @@ test_timer_functionality(void)
TEST_ERROR;
err = H5_timer_get_times(timer, &times);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
err = H5_timer_get_total_times(timer, &times);
- if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, (double)0.0f))
+ if (err < 0 || !H5_DBL_ABS_EQUAL(times.elapsed, 0.0))
TEST_ERROR;
/* Timer state should flip */
@@ -326,12 +326,12 @@ test_timer_functionality(void)
/* Times should be non-negative */
err = H5_timer_get_times(timer, &times);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
prev_etime = times.elapsed;
err = H5_timer_get_total_times(timer, &times);
- if (err < 0 || times.elapsed < (double)0.0f)
+ if (err < 0 || times.elapsed < 0.0)
TEST_ERROR;
prev_total_etime = times.elapsed;