chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1610: test duration should be printed as inexact


From: Chicken Trac
Subject: [Chicken-janitors] #1610: test duration should be printed as inexact
Date: Tue, 23 Apr 2019 11:34:55 -0000

#1610: test duration should be printed as inexact
------------------------+--------------------------------
 Reporter:  felix       |                 Owner:
     Type:  defect      |                Status:  new
 Priority:  minor       |             Milestone:  someday
Component:  extensions  |               Version:
 Keywords:  test        |  Estimated difficulty:  trivial
------------------------+--------------------------------
 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))
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1610>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]