testutils.tcl File Reference

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

Function Documentation

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.

00084                   {node1 node2} {

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 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:

ret ok (  ) 

Definition at line 20 of file testutils.tcl.

00020 { return {} }

ret result ( type  result  ) 

Definition at line 25 of file testutils.tcl.

00025 { return $result }

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 Documentation

variable tracing

Definition at line 11 of file testutils.tcl.

variable tracingErrors

Definition at line 12 of file testutils.tcl.


Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1