summaryrefslogtreecommitdiffstats
path: root/tests/expr.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2018-09-28 09:18:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2018-09-28 09:18:49 (GMT)
commit9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a (patch)
tree233faf46a3a4bde6f5a4c5ad45db18d7e7cdd69e /tests/expr.test
parent0d36d5f3d85b79ed2c3565112c78bbd18d1a7990 (diff)
parent2f3fc1cfa29f6a4dac413ac62258bfb235feb257 (diff)
downloadtcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.zip
tcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.tar.gz
tcl-9dabbdf40b10e3f0419d5ad5b96f4d7c3189bc6a.tar.bz2
merge core-8-branch
Diffstat (limited to 'tests/expr.test')
-rw-r--r--tests/expr.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/expr.test b/tests/expr.test
index de6eb4a..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]
@@ -7157,6 +7156,15 @@ test expr-51.1 {test round-to-even on input} {
expr 6.9294956446009195e15
} 6929495644600920.0
+test expr-52.1 {
+ comparison with empty string does not generate string representation
+} {
+ set a [list one two three]
+ list [expr {$a eq {}}] [expr {$a < {}}] [expr {$a > {}}] [
+ string match {*no string representation*} [
+ ::tcl::unsupported::representation $a]]
+} {0 0 1 1}
+
# cleanup