diff options
author | dgp <dgp@noemail.net> | 2006-10-30 16:30:34 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2006-10-30 16:30:34 (GMT) |
commit | ff3e101a9d3b862602bfc42ca34bd57de27187c2 (patch) | |
tree | 480083628a026836117223a7fee5b8c5671db116 /tests | |
parent | 42e1e48d8d3e1d8bf9b82ec0988e5de996e3aeac (diff) | |
download | tcl-ff3e101a9d3b862602bfc42ca34bd57de27187c2.zip tcl-ff3e101a9d3b862602bfc42ca34bd57de27187c2.tar.gz tcl-ff3e101a9d3b862602bfc42ca34bd57de27187c2.tar.bz2 |
* generic/tclExecute.c (INST_MOD): Corrected improper testing of
* tests/expr.test: the sign of bignums when applying Tcl's
division rules. Thanks to Peter Spjuth. [Bug 1585704]
FossilOrigin-Name: bd19f966cc58961f52c64b5484aa1d56267ac9f1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expr.test | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test index dafdc8e..9fc56e5 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.63 2006/10/09 19:15:44 msofer Exp $ +# RCS: @(#) $Id: expr.test,v 1.64 2006/10/30 16:30:36 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 @@ -5368,6 +5368,19 @@ test expr-32.2 {expr div basics} { -3 -2 -1 -1 -1 \ ] +test expr-32.3 {Bug 1585704} { + expr 1%(1<<63) +} 1 +test expr-32.4 {Bug 1585704} { + expr -1%(1<<63) +} [expr (1<<63)-1] +test expr-32.5 {Bug 1585704} { + expr (1<<32)%(1<<63) +} [expr 1<<32] +test expr-32.6 {Bug 1585704} { + expr -(1<<32)%(1<<63) +} [expr (1<<63)-(1<<32)] + test expr-33.1 {parse largest long value} longIs32bit { set max_long_str 2147483647 set max_long_hex "0x7FFFFFFF " |