From 83a66dd9c601577164c4f24a324d0b9cf40c8456 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 11 Dec 2018 20:21:52 +0100 Subject: [PATCH] times: Fix tests. * tests/test-times.c (doublecmp): Implement a total order. --- ChangeLog | 5 +++++ tests/test-times.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 019b8252e1..82e3a499cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-12-11 Bruno Haible + + times: Fix tests. + * tests/test-times.c (doublecmp): Implement a total order. + 2018-12-11 Bruno Haible array-set, linkedhash-set, hash-set: Fix tests. diff --git a/tests/test-times.c b/tests/test-times.c index eb069e41ff..7781e575d0 100644 --- a/tests/test-times.c +++ b/tests/test-times.c @@ -35,7 +35,7 @@ doublecmp (const void *p, const void *q) double a = *(double *) p; double b = *(double *) q; - return a < b; + return a < b ? -1 : a > b ? 1 : 0; } int -- 2.39.5