diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-15 14:28:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-15 14:28:47 (GMT) |
commit | 66a15c6f8be47c3acbdddffadc67f50dec8a56e6 (patch) | |
tree | edaf81ee6d40edeacc9f3e2093ddcb2ba302c620 /tests/format.test | |
parent | 2827a2692798a7a0ec46e684a4ccc83afb39859e (diff) | |
download | tcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.zip tcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.tar.gz tcl-66a15c6f8be47c3acbdddffadc67f50dec8a56e6.tar.bz2 |
TIP#72 implementation. See ChangeLog for details.
This version builds clean on Solaris/SPARC, with GCC and CC, both with and
without threads and both in 32-bit and 64-bit mode.
Diffstat (limited to 'tests/format.test')
-rw-r--r-- | tests/format.test | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/format.test b/tests/format.test index 67a4086..b7990b3 100644 --- a/tests/format.test +++ b/tests/format.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: format.test,v 1.9 2001/08/23 13:57:08 dkf Exp $ +# RCS: @(#) $Id: format.test,v 1.10 2002/02/15 14:28:50 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -481,12 +481,27 @@ for {set i 0} {$i < 290} {incr i} { append b $a } for {set i 290} {$i < 400} {incr i} { - test format-15.[expr $i -290] {testing MAX_FLOAT_SIZE} { + test format-16.[expr $i -289] {testing MAX_FLOAT_SIZE} { format {%s} $b } $b append b "x" } +set ::tcltest::testConstraints(64bitInts) \ + [expr {0x80000000 > 0}] +set ::tcltest::testConstraints(wideIntExpressions) \ + [expr {wide(0x80000000) != int(0x80000000)}] + +test format-17.1 {testing %d with wide} {64bitInts wideIntExpressions} { + list [catch {format %d 7810179016327718216} msg] $msg +} {1 {integer value too large to represent}} +test format-17.2 {testing %ld with wide} {64bitInts} { + format %ld 7810179016327718216 +} 7810179016327718216 +test format-17.3 {testing %ld with non-wide} {64bitInts} { + format %ld 42 +} 42 + # cleanup catch {unset a} catch {unset b} |