Opened 6 years ago

Closed 4 years ago

#1610 closed defect (fixed)

test duration should be printed as inexact

Reported by: felix winkelmann Owned by: Alex Shinn
Priority: minor Milestone: someday
Component: extensions Version:
Keywords: test Cc:
Estimated difficulty: trivial

Description

In the test egg, the duration of a test is given as an exact value, which should probably be an inexact. Here a simple patch:

--- test-support.scm	(revision 37545)
+++ test-support.scm	(working copy)
@@ -320,11 +320,12 @@
          (start-milliseconds
           (or (test-group-ref group 'start-milliseconds) 0))
          (duration
-          (if (and start-time (> (- end-time start-time) 60))
+          (exact->inexact
+           (if (and start-time (> (- end-time start-time) 60))
               (/ (- (+ (* end-time 1000) end-milliseconds)
                     (+ (* start-time 1000) start-milliseconds))
                  1000)
-              (/ (- end-milliseconds start-milliseconds) 1000)))
+              (/ (- end-milliseconds start-milliseconds) 1000))))
          (count (or (test-group-ref group 'count) 0))
          (pass (or (test-group-ref group 'PASS) 0))
          (fail (or (test-group-ref group 'FAIL) 0))

Change History (2)

comment:1 Changed 6 years ago by sjamaan

Owner: set to Alex Shinn
Status: newassigned

comment:2 Changed 4 years ago by sjamaan

Resolution: fixed
Status: assignedclosed

Has been fixed in r39603 by turning the 1000 constant into an inexact.

Note: See TracTickets for help on using tickets.