Skip to content
Tcl Source Code History Of Ticket 2790198fff
Login

History Of Ticket 2790198fff

Artifacts Associated With Ticket 2790198fff

  1. Ticket change [0476418d5b] (rid 120005) by glennjnn on 2009-05-11 16:59:35:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized 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 initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "glennjnn"
    10. subsystem initialized to: "34. tcltest Package"
    11. title initialized to: "new -match mode: boolean"
    12. type initialized to: "RFE"
  2. Ticket change [ebf1bf5f00] (rid 103624) by glennjnn on 2009-05-12 09:49:27:

    1. icomment:
      example usage:
      test b1 {true test} -match boolean -body {expr 0==0} -result true
      test b2 {false test} -match boolean -body {expr {3 in {}}} -result no
      
      
      
      
    2. login: "glennjnn"
    3. mimetype: "text/plain"
    4. username: "glennjnn"