Summary
test duration should be printed as inexact
Metadata
- Id: 685a31ae76ec9760b4f29b81185925418084002a
- Trac id: 1610
- Type: defect
- Reporter: felix
- Owner: ashinn
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty: trivial
- Resolution: fixed
- Priority: minor
- Milestone: someday
- Version:
- Changetime: 2021-04-12 08:52:19 UTC
- Created: 2019-04-23 13:34:55 UTC
- Keywords: test
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))
Changes and comments
[2019-04-23 13:39:30 UTC] sjamaan changed status from new to assigned
[2019-04-23 13:39:30 UTC] sjamaan set owner to ashinn
[2021-04-12 08:52:19 UTC] sjamaan changed status from assigned to closed
[2021-04-12 08:52:19 UTC] sjamaan set resolution to fixed
[2021-04-12 08:52:19 UTC] sjamaan wrote:
Has been fixed in r39603 by turning the 1000 constant into an inexact.