diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-03-21 11:12:27 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-03-21 11:12:27 (GMT) |
commit | 86ca5531ac0818f99726ba9ad478e277cd5d6e94 (patch) | |
tree | cb78904bbef94025a4f19257afc9211ee618e8ce /tests/compExpr-old.test | |
parent | d4070e928ea23c067c492b5e594d206a76d9b3d5 (diff) | |
download | tcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.zip tcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.tar.gz tcl-86ca5531ac0818f99726ba9ad478e277cd5d6e94.tar.bz2 |
Use test constraints properly instead of looking in tcl_platform
Consistent method of calling test constraints, and (try to) move constraint
setup to the top of the test file
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 |