diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-03 10:43:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-03 10:45:43 -0400 |
commit | d5a3bb960d41873ccfde0bbdb4adfb762528069e (patch) | |
tree | 45e5a10184c90df512d54f49ac4b2101ed3a258c /src/test/test_util.c | |
parent | 9568c0ce3d3885a41ca44ac030b04d089ac56a40 (diff) | |
download | tor-d5a3bb960d41873ccfde0bbdb4adfb762528069e.tar.gz tor-d5a3bb960d41873ccfde0bbdb4adfb762528069e.zip |
Retire U64_TO_DBL and DBL_TO_U64
These were necessary long ago to work around a bug in VC6.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r-- | src/test/test_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 67a10a8a57..e6348bfea8 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -2184,10 +2184,10 @@ test_util_parse_integer(void *arg) /* Test parse_double */ double d = tor_parse_double("10", 0, (double)UINT64_MAX,&i,NULL); tt_int_op(1,OP_EQ, i); - tt_assert(DBL_TO_U64(d) == 10); + tt_assert(((uint64_t)d) == 10); d = tor_parse_double("0", 0, (double)UINT64_MAX,&i,NULL); tt_int_op(1,OP_EQ, i); - tt_assert(DBL_TO_U64(d) == 0); + tt_assert(((uint64_t)d) == 0); d = tor_parse_double(" ", 0, (double)UINT64_MAX,&i,NULL); tt_double_op(fabs(d), OP_LT, 1e-10); tt_int_op(0,OP_EQ, i); @@ -2199,7 +2199,7 @@ test_util_parse_integer(void *arg) tt_int_op(1,OP_EQ, i); d = tor_parse_double("-.0", 0, (double)UINT64_MAX,&i,NULL); tt_int_op(1,OP_EQ, i); - tt_assert(DBL_TO_U64(d) == 0); + tt_assert(((uint64_t)d) == 0); d = tor_parse_double("-10", -100.0, 100.0,&i,NULL); tt_int_op(1,OP_EQ, i); tt_double_op(fabs(d - -10.0),OP_LT, 1E-12); |