diff options
Diffstat (limited to 'tests/compExpr-old.test')
-rw-r--r-- | tests/compExpr-old.test | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test index b1e36bd..cd406a1 100644 --- a/tests/compExpr-old.test +++ b/tests/compExpr-old.test @@ -12,14 +12,14 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: compExpr-old.test,v 1.16 2005/11/08 22:09:56 dgp Exp $ +# RCS: @(#) $Id: compExpr-old.test,v 1.17 2006/03/21 11:12:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } -if {([catch {expr T1()} msg] == 1) && ($msg == {unknown math function "T1"})} { +if {[catch {expr T1()} msg] && $msg eq {unknown math function "T1"}} { testConstraint testmathfunctions 0 } else { testConstraint testmathfunctions 1 @@ -81,7 +81,10 @@ proc testIEEE {} { } } } -::tcltest::testConstraint ieeeFloatingPoint [testIEEE] +testConstraint ieeeFloatingPoint [testIEEE] + +testConstraint longIs32bit [expr {int(0x80000000) < 0}] +testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}] # procedures used below @@ -358,13 +361,9 @@ test compExpr-old-9.4 {CompileRelationalExpr: just shift expr} {expr {1<<3}} 8 # The following test is different for 32-bit versus 64-bit # architectures because LONG_MIN is different -testConstraint longIs32bit [expr {int(0x80000000) < 0}] -testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}] - test compExpr-old-9.5a {CompileRelationalExpr: shift expr producing LONG_MIN} longIs64bit { expr {int(1<<63)} } -9223372036854775808 - test compExpr-old-9.5b {CompileRelationalExpr: shift expr producing LONG_MIN} longIs32bit { expr {int(1<<31)} } -2147483648 |