Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0476418d5b6524e7bc4fb12c628ddf0745abb18e
Ticket: 2790198fffffffffffffffffffffffffffffffff
new -match mode: boolean
User & Date: glennjnn on 2009-05-11 16:59:35
Changes

  1. assignee changed to: "dgp"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    To support tests where the body returns a boolean value, but the exact format of the value is unknown but should be one of the Tcl_GetBoolean values, a new -match mode "boolean" is suggested.  This mode would behave like this customMatch:
    
        # test passes if expected and actual are both true or both false
        customMatch boolean {apply {{e a} {expr {
            [string is boolean -strict $e] && 
            [string is boolean -strict $a] && 
            (($e && $a) || (!$e && !$a))
        }}}}
    
    I see this can be slotted into tcltest.tcl around line 3318 of the current HEAD (v 1.104), and it already requires Tcl 8.5
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "glennjnn"
  10. subsystem changed to: "34. tcltest Package"
  11. title changed to: "new -match mode: boolean"
  12. type changed to: "RFE"