diff options
Diffstat (limited to 'tests/stringComp.test')
-rw-r--r-- | tests/stringComp.test | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/stringComp.test b/tests/stringComp.test index 9e00ce7..2a92e59 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -if {[lsearch [namespace children] ::tcltest] == -1} { +if {"::tcltest" ni [namespace children]} { package require tcltest namespace import -force ::tcltest::* } @@ -39,7 +39,7 @@ test stringComp-1.3 {error condition - undefined method during compile} { # We don't want this to complain about 'never' because it may never # be called, or string may get redefined. This must compile OK. proc foo {str i} { - if {"yes" == "no"} { string never called but complains here } + if {"yes" eq "no"} { string never called but complains here } string index $str $i } foo abc 0 @@ -353,14 +353,13 @@ test stringComp-5.20 {string index, bytearray object out of bounds} { foo } {} - proc largest_int {} { # This will give us what the largest valid int on this machine is, # so we can test for overflow properly below on >32 bit systems set int 1 set exp 7; # assume we get at least 8 bits while {$int > 0} { set int [expr {1 << [incr exp]}] } - return [expr {$int-1}] + return [expr {$int - 1}] } ## string is |