summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-16 10:16:04 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-16 10:16:04 -0400
commit41cb26c1696b2e91f6ffe28c98ab471b925de9e8 (patch)
treeef4ab6198667a0fd44f4fb5085cf9306ffc6b3b5 /src/test/test_util.c
parentf05a213fe1706ce3ba76e12dc8e6f36f74c92794 (diff)
downloadtor-41cb26c1696b2e91f6ffe28c98ab471b925de9e8.tar.gz
tor-41cb26c1696b2e91f6ffe28c98ab471b925de9e8.zip
Correct the rounding behavior on tv_mdiff.
Fix for bug 19428.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index dd600d96fc..83b48c9f59 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -286,12 +286,12 @@ test_util_time(void *arg)
end.tv_usec = 0;
tt_int_op(995000L,OP_EQ, tv_udiff(&start, &end));
- // tt_int_op(996L,OP_EQ, tv_mdiff(&start, &end)); // XXXX fails
+ tt_int_op(995L,OP_EQ, tv_mdiff(&start, &end));
end.tv_sec = 4;
tt_int_op(-1005000L,OP_EQ, tv_udiff(&start, &end));
- // tt_int_op(-1005L,OP_EQ, tv_udiff(&start, &end)); // XXXX Fails
+ tt_int_op(-1005L,OP_EQ, tv_mdiff(&start, &end));
end.tv_sec = TIME_MAX;
tt_int_op(LONG_MAX, OP_EQ, tv_udiff(&start, &end));