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/expr-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/expr-old.test')
-rw-r--r-- | tests/expr-old.test | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index e6edcde..0e42a76 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -13,14 +13,19 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr-old.test,v 1.31 2005/11/09 20:24:10 dgp Exp $ +# RCS: @(#) $Id: expr-old.test,v 1.32 2006/03/21 11:12:29 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 namespace import -force ::tcltest::* } -if {([catch {expr T1()} msg] == 1) && ($msg == {unknown math function "T1"})} { +testConstraint testexprlong [llength [info commands testexprlong]] +testConstraint testexprdouble [llength [info commands testexprdouble]] +testConstraint testexprstring [llength [info commands testexprstring]] +testConstraint longIs32bit [expr {int(0x80000000) < 0}] + +if {[catch {expr T1()} msg] && $msg eq {unknown math function "T1"}} { testConstraint testmathfunctions 0 } else { testConstraint testmathfunctions 1 @@ -82,7 +87,7 @@ proc testIEEE {} { } } } -::tcltest::testConstraint ieeeFloatingPoint [testIEEE] +testConstraint ieeeFloatingPoint [testIEEE] # First, test all of the integer operators individually. @@ -1017,11 +1022,6 @@ test expr-old-36.16 {ExprLooksLikeInt procedure} { expr {$x+1} } [expr 0x100000000000000000000000000000000000000] -testConstraint testexprlong [llength [info commands testexprlong]] -testConstraint testexprdouble [llength [info commands testexprdouble]] -testConstraint testexprstring [llength [info commands testexprstring]] -testConstraint longIs32bit [expr {int(0x80000000) < 0}] - test expr-old-37.1 {Check that Tcl_ExprLong doesn't modify interpreter result if no error} testexprlong { testexprlong 4+1 } {This is a result: 5} |