summaryrefslogtreecommitdiffstats
path: root/tests/expr-old.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 19:36:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-08 19:36:29 (GMT)
commitdf93fd85a35f40f47d2d6b9a7ec9326346b3b6b4 (patch)
tree6744c6bef5b033702c89aa10637679f26083fa6d /tests/expr-old.test
parent1812305cb35d0096d50f9b1e7c1c368f230b6f07 (diff)
parente7a40e1084f2d3c711a2aeccccb9b9b40b0c37e7 (diff)
downloadtcl-df93fd85a35f40f47d2d6b9a7ec9326346b3b6b4.zip
tcl-df93fd85a35f40f47d2d6b9a7ec9326346b3b6b4.tar.gz
tcl-df93fd85a35f40f47d2d6b9a7ec9326346b3b6b4.tar.bz2
Merge 8.7
Diffstat (limited to 'tests/expr-old.test')
-rw-r--r--tests/expr-old.test18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 50040a5..9f9ad99 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -814,10 +814,10 @@ test expr-old-32.32 {math functions in expressions} {
} {-1}
test expr-old-32.33 {math functions in expressions} {
expr int(1e60)
-} 0
+} 999999999999999949387135297074018866963645011013410073083904
test expr-old-32.34 {math functions in expressions} {
expr int(-1e60)
-} 0
+} -999999999999999949387135297074018866963645011013410073083904
test expr-old-32.35 {math functions in expressions} {
expr round(1.49)
} {1}
@@ -1036,8 +1036,8 @@ test expr-old-37.8 {Tcl_ExprLong handles overflows} testexprlong {
testexprlong -0x80000000
} {This is a result: -2147483648}
test expr-old-37.9 {Tcl_ExprLong handles overflows} {testexprlong longIs32bit} {
- testexprlong -0xffffffff
-} {This is a result: 1}
+ testexprlong -0x7fffffff
+} {This is a result: -2147483647}
test expr-old-37.10 {Tcl_ExprLong handles overflows} \
-constraints {testexprlong longIs32bit} \
-match glob \
@@ -1061,9 +1061,13 @@ test expr-old-37.13 {Tcl_ExprLong handles overflows} \
test expr-old-37.14 {Tcl_ExprLong handles overflows} testexprlong {
testexprlong -2147483648.
} {This is a result: -2147483648}
-test expr-old-37.15 {Tcl_ExprLong handles overflows} {testexprlong longIs32bit} {
- testexprlong -4294967295.
-} {This is a result: 1}
+test expr-old-37.15 {Tcl_ExprLong handles overflows} \
+ -constraints {testexprlong longIs32bit} \
+ -match glob \
+ -body {
+ list [catch {testexprlong -2147483649.} result] $result
+ } \
+ -result {1 {integer value too large to represent*}}
test expr-old-37.16 {Tcl_ExprLong handles overflows} \
-constraints {testexprlong longIs32bit} \
-match glob \