From 569c6676a6ddb0ff73821d7693b5e18ddef809b9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 16 Oct 2014 22:51:35 -0400 Subject: Imported Upstream version 3.2.0 --- test/boundary3.tcl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'test/boundary3.tcl') diff --git a/test/boundary3.tcl b/test/boundary3.tcl index ac3bf0a..5fc26d6 100644 --- a/test/boundary3.tcl +++ b/test/boundary3.tcl @@ -13,7 +13,6 @@ puts {# 2008 December 11 # This file is automatically generated from a separate TCL script. # This file seeks to exercise integer boundary values. # -# $Id: boundary3.tcl,v 1.3 2009/01/02 15:45:48 shane Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -40,16 +39,16 @@ foreach x { } { set x [expr {wide($x)}] set boundarynum($x) 1 - set boundarynum([expr {$x+1}]) 1 - set boundarynum([expr {-($x+1)}]) 1 - set boundarynum([expr {-($x+2)}]) 1 - set boundarynum([expr {$x+$x+1}]) 1 - set boundarynum([expr {$x+$x+2}]) 1 + set boundarynum([expr {wide($x+1)}]) 1 + set boundarynum([expr {wide(-($x+1))}]) 1 + set boundarynum([expr {wide(-($x+2))}]) 1 + set boundarynum([expr {wide($x+$x+1)}]) 1 + set boundarynum([expr {wide($x+$x+2)}]) 1 } set x [expr {wide(127)}] for {set i 1} {$i<=9} {incr i} { set boundarynum($x) 1 - set boundarynum([expr {$x+1}]) 1 + set boundarynum([expr {wide($x+1)}]) 1 set x [expr {wide($x*128 + 127)}] } @@ -116,7 +115,7 @@ foreach r $nums1 { incr a set t1ra($r) $a set t1ar($a) $r - set x [format %08x%08x [expr {wide($r)>>32}] $r] + set x [format %016x [expr {wide($r)}]] set t1rx($r) $x set t1xr($x) $r puts " INSERT INTO t1(oid,a,x) VALUES($r,$a,'$x');" @@ -158,7 +157,7 @@ foreach r $nums3 { set r5 $r.5 set r0 $r.0 - if {abs($r)<9.22337203685477580800e+18} { + if {abs($r)<0x7FFFFFFFFFFFFFFF || $r==-9223372036854775808} { set x $t1rx($r) set a $t1ra($r) puts "do_test $tname-2.$i.1 \173" -- cgit v1.2.3