diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-03 12:53:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-03 12:53:15 (GMT) |
commit | 2f2b7f6ac7122f3b6be07e793e1658cdb5791aa2 (patch) | |
tree | ed9189deb7f4bee3b751fa2588d626b12111cffd /tests/expr.test | |
parent | 5f1bd2f2e3aa755c4216fb0e47dd2c04f47a1453 (diff) | |
download | tcl-2f2b7f6ac7122f3b6be07e793e1658cdb5791aa2.zip tcl-2f2b7f6ac7122f3b6be07e793e1658cdb5791aa2.tar.gz tcl-2f2b7f6ac7122f3b6be07e793e1658cdb5791aa2.tar.bz2 |
Eliminate use of wideBiggerThanInt test constraint, since it's the same as {longIs32bit wideIs64bit}. And ... it's name is actually wrong ...
Don't use int() any more in any test constraint, since it's semantics might change. We don't want the test constraints to change with it. (See: TIP# 514)
Simplify implementation of wideIs64bit test constraint, just testing for 64-bit sign bit is enough.
Diffstat (limited to 'tests/expr.test')
-rw-r--r-- | tests/expr.test | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/expr.test b/tests/expr.test index 713681a..0762cf2 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -21,10 +21,9 @@ catch [list package require -exact Tcltest [info patchlevel]] # Determine if "long int" type is a 32 bit number and if the wide # type is a 64 bit number on this machine. -testConstraint longIs32bit [expr {int(0x80000000) < 0}] -testConstraint longIs64bit [expr {int(0x8000000000000000) < 0}] -testConstraint wideIs64bit \ - [expr {(wide(0x80000000) > 0) && (wide(0x8000000000000000) < 0)}] +testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}] +testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}] +testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}] # Big test for correct ordering of data in [expr] |