diff options
author | Kevin B Kenny <kennykb@acm.org> | 2005-08-05 19:19:01 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2005-08-05 19:19:01 (GMT) |
commit | 67c0945cef73efba280dda5e10e75f8f740ca1ae (patch) | |
tree | d5cde9c6342d799dd709df022d80ecd665932579 /tests/expr.test | |
parent | 2af5fccf013d0106280ab267b33a07945bcfb272 (diff) | |
download | tcl-67c0945cef73efba280dda5e10e75f8f740ca1ae.zip tcl-67c0945cef73efba280dda5e10e75f8f740ca1ae.tar.gz tcl-67c0945cef73efba280dda5e10e75f8f740ca1ae.tar.bz2 |
fix abs(MIN_INT) [Bug 1241572]
Diffstat (limited to 'tests/expr.test')
-rw-r--r-- | tests/expr.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test index 6ba6732..b3707b8 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.17.2.4 2004/11/02 15:46:35 dkf Exp $ +# RCS: @(#) $Id: expr.test,v 1.17.2.5 2005/08/05 19:19:14 kennykb Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -21,6 +21,7 @@ testConstraint registeredMathFuncs [expr { ([catch {expr T1()} msg] != 1) || ($msg ne {unknown math function "T1"}) }] +testConstraint wideIs64bit [expr {(0x80000000 > 0) && (0x8000000000000000 < 0)}] # procedures used below proc put_hello_char {c} { @@ -822,6 +823,11 @@ test expr-24.7 {expr edge cases; shifting} {expr wide(5)<<31} 10737418240 test expr-24.8 {expr edge cases; shifting} nonPortable {expr wide(5)<<63} -9223372036854775808 test expr-24.9 {expr edge cases; shifting} {expr 5>>32} 0 +test expr-38.1 {abs of smallest 32-bit integer [Bug 1241572]} {wideIs64bit} { + expr {abs(int(-2147483648))} +} 2147483648 + + # cleanup if {[info exists a]} { unset a |