unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob e37425c0c82b649a735f7333e21e7973608825e3 604 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 
* On i686 floating-point roundoff errors could sometimes cause this check to
  fail depending on the elapsed microseconds.  Improve rounding by adding a
  fractional bit.

--- glib-2.40.0/glib/tests/timer.c	2014-03-05 08:05:42.000000000 -0600
+++ glib-2.40.0/glib/tests/timer.c	2014-07-10 16:33:12.746862822 -0500
@@ -35,7 +35,7 @@
   elapsed = g_timer_elapsed (timer, &micros);
 
   g_assert_cmpfloat (elapsed, <, 1.0);
-  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000);
+  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000);
 
   g_timer_destroy (timer);
 }

debug log:

solving e37425c0c8 ...
found e37425c0c8 in https://git.savannah.gnu.org/cgit/guix.git

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).