Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 807f9d2e17c0276e90753e3dfd81b24117d3bbfdf8a9672d3d01122bc8e17619
Ticket: 1a3fa1232e306a447f480f76a9c83d1bdbf358d2
test cmdMZ-6.5 not testing all code paths
User & Date: emiliano on 2019-03-30 18:16:22
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    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.
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "emiliano"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "885ae311f5fce05c2a8d9c31d2d2a1b5638ca9df"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "emiliano"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to: "test cmdMZ-6.5 not testing all code paths"
  16. type changed to: "Bug"