Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2019-04-01
13:55 • Closed ticket [1a3fa1232e]: test cmdMZ-6.5 not testing all code paths plus 6... artifact: b6d3f2533b user: sebres
13:53
closes [1a3fa1232e306a44], test case cmdMZ-6.5 fixed to cover float value by iteration per second check-in: c925d4759d user: sebres tags: core-8-5-branch
2019-03-30
18:17 • Add attachment timerate.diff to ticket [1a3fa1232e] artifact: 7db543281b user: emiliano
18:16 • New ticket [1a3fa1232e] test cmdMZ-6.5 not testing all code paths. artifact: 807f9d2e17 user: emiliano

test cmdMZ-6.5 not testing all code paths

Closed / Fixed1a3fa1232e306a447f480f76a9c83d1bdbf358d2Created 8 years agoUpdated 8 years ago
Descriptionplain2019-03-30 18:16:22
testing trunk on a slow machine shows a failing test cmdMZ-6.5

cmdMZ.test


==== cmdMZ-6.5 Tcl_TimeRateObjCmd: result format and one iteration FAILED
==== Contents of test case:

    regexp {^\d+.\d+ \ws/# 1 # \d+ #/sec \d+.\d+ nett-ms$} [timerate {} 0]

---- Result was:
0
---- Result should have been (exact matching):
1
==== cmdMZ-6.5 FAILED

code shows that the result of [timerate] is a list and the fourth element can be either an integer or a float with 1, 2 or 3 decimals (file generic/tclCmdMZ.c, lines 4424-4438) but only the integer path is tested. 

The obvious solution is to test for those possibilities as well.

No other code paths were tested/reviewed.
sebreswiki2019-04-01 13:55:35

Fixed in [c925d4759d96961f]. Thx!

Log in (anonymous is fine) to add a comment.