Go to the source code of this file.
Functions/Subroutines | |
ret | ok () |
ret | result (type result) |
ret | tracemsg (type string) |
ret | assert (type expr, optional message="") |
ret | expectError (type script, optional pattern="*") |
ret sortedarray | arrName (type upvar 1 $, type arrName, type thearray, type set, type result, optional, type foreach, type idx[, type lsort[, type array, type names, type thearray]], optional lappend=result $idx=$thearray($idx), type return $, type result) proc compareNodes |
Variables | |
variable | tracing |
variable | tracingErrors |
ret sortedarray arrName | ( | type upvar 1 $ | , | |
type | arrName, | |||
type | thearray, | |||
type | set, | |||
type | result, | |||
optional | , | |||
type | foreach, | |||
type idx] | [, type lsort[, type array, type names, type thearray], | |||
optional | lappend = result $idx =$thearray($idx) , |
|||
type return $ | , | |||
type | result | |||
) |
Definition at line 70 of file testutils.tcl.
ret assert | ( | type | expr, | |
optional | message = "" | |||
) |
Definition at line 40 of file testutils.tcl.
References error().
00040 { 00041 if {![uplevel 1 [list expr $expr]]} { 00042 return -code error "Assertion {$expr} failed:\n$message" 00043 } 00044 }
ret expectError | ( | type | script, | |
optional | pattern = "*" | |||
) |
Definition at line 53 of file testutils.tcl.
References error(), result(), and tracingErrors.
00053 { 00054 set rc [catch [list uplevel 1 $script] result] 00055 if {$::tracingErrors} { 00056 puts stderr "==> [string replace $result 70 end ...]" 00057 } 00058 set rmsg [string replace $result 40 end ...] 00059 if {$rc != 1} { 00060 return -code error \ 00061 "Expected error, got '$rmsg' (rc=$rc)" 00062 } 00063 return $result 00064 }
ret ok | ( | ) |
Definition at line 20 of file testutils.tcl.
ret result | ( | type | result | ) |
Definition at line 25 of file testutils.tcl.
ret tracemsg | ( | type | string | ) |
Definition at line 30 of file testutils.tcl.
References tracing.
00030 { 00031 if {$::tracing} { 00032 puts $::tcltest::outputChannel $string 00033 } 00034 }
variable tracing |
Definition at line 11 of file testutils.tcl.
variable tracingErrors |
Definition at line 12 of file testutils.tcl.