diff options
-rw-r--r-- | library/opt/optparse.tcl | 2 | ||||
-rw-r--r-- | library/tcltest/tcltest.tcl | 2 | ||||
-rw-r--r-- | tests/clock.test | 8 | ||||
-rw-r--r-- | tests/exec.test | 2 | ||||
-rw-r--r-- | tests/fileSystem.test | 2 | ||||
-rw-r--r-- | tests/foreach.test | 2 | ||||
-rw-r--r-- | tests/format.test | 20 | ||||
-rw-r--r-- | tests/info.test | 2 | ||||
-rw-r--r-- | tests/io.test | 36 | ||||
-rw-r--r-- | tests/lmap.test | 2 | ||||
-rw-r--r-- | tests/parse.test | 18 | ||||
-rw-r--r-- | tests/parseOld.test | 4 | ||||
-rw-r--r-- | tests/string.test | 14 | ||||
-rw-r--r-- | tests/util.test | 74 |
14 files changed, 94 insertions, 94 deletions
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl index 1639379..454b923 100644 --- a/library/opt/optparse.tcl +++ b/library/opt/optparse.tcl @@ -601,7 +601,7 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} { return [expr {$arg ? 1 : 0}] } choice { - if {[lsearch -exact $typeArgs $arg] < 0} { + if {$arg ni $typeArgs} { error "invalid choice" } return $arg diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 3c58782..eb47963 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -648,7 +648,7 @@ namespace eval tcltest { proc IsVerbose {level} { variable Option - return [expr {[lsearch -exact $Option(-verbose) $level] >= 0}] + return [expr {$level in $Option(-verbose)}] } # Default verbosity is to show bodies of failed tests diff --git a/tests/clock.test b/tests/clock.test index 4283020..37c8066 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35470,7 +35470,7 @@ test clock-33.5 {clock clicks tests, millisecond timing test} { expr { ($end > $start) && (($end - $start) <= 60) ? "ok" : - "test should have taken 0-60 ms, actually took [expr $end - $start]"} + "test should have taken 0-60 ms, actually took [expr {$end - $start}]"} } {ok} test clock-33.5a {clock tests, millisecond timing test} { # This test can fail on a system that is so heavily loaded that @@ -35486,7 +35486,7 @@ test clock-33.5a {clock tests, millisecond timing test} { expr { ($end > $start) && (($end - $start) <= 60) ? "ok" : - "test should have taken 0-60 ms, actually took [expr $end - $start]"} + "test should have taken 0-60 ms, actually took [expr {$end - $start}]"} } {ok} test clock-33.6 {clock clicks, milli with too much abbreviation} { list [catch { clock clicks ? } msg] $msg @@ -36930,10 +36930,10 @@ test clock-61.2 {overflow of a wide integer on output} {*}{ } test clock-61.3 {near-miss overflow of a wide integer on output} { clock format 0x7fffffffffffffff -format %s -gmt true -} [expr 0x7fffffffffffffff] +} [expr {0x7fffffffffffffff}] test clock-61.4 {near-miss overflow of a wide integer on output} { clock format -0x8000000000000000 -format %s -gmt true -} [expr -0x8000000000000000] +} [expr {-0x8000000000000000}] test clock-62.1 {Bug 1902423} {*}{ -setup {::tcl::clock::ClearCaches} diff --git a/tests/exec.test b/tests/exec.test index 6a05c75..412cd4c 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -113,7 +113,7 @@ set path(sh2) [makeFile { exit } sh2] set path(sleep) [makeFile { - after [expr $argv*1000] + after [expr {$argv*1000}] exit } sleep] set path(exit) [makeFile { diff --git a/tests/fileSystem.test b/tests/fileSystem.test index d5a7c01..0b53be5 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -167,7 +167,7 @@ test filesystem-1.12 {file new native path} {} { } } # If we reach here we've succeeded. We used to crash above. - expr 1 + expr {1} } {1} test filesystem-1.13 {file normalisation} {win} { # This used to be broken diff --git a/tests/foreach.test b/tests/foreach.test index 85dc3da..4a1c35a 100644 --- a/tests/foreach.test +++ b/tests/foreach.test @@ -165,7 +165,7 @@ test foreach-4.1 {noncompiled foreach and shared variable or value list objects catch {unset x} foreach {12.0} {a b c} { set x 12.0 - set x [expr $x + 1] + set x [expr {$x + 1}] } set x } 13.0 diff --git a/tests/format.test b/tests/format.test index 4e1b8da..7fcefa4 100644 --- a/tests/format.test +++ b/tests/format.test @@ -381,20 +381,20 @@ test format-8.23 {error conditions} { # scripts, therefore they are not documented. It's intended use is through # the function Tcl_AppendPrintfToObj (et al). test format-8.24 {Undocumented formats} -body { - format "%zd %td %d" [expr 2**30] [expr 2**30] [expr 2**30] + format "%zd %td %d" [expr {2**30}] [expr {2**30}] [expr {2**30}] } -result {1073741824 1073741824 1073741824} test format-8.25 {Undocumented formats} -constraints pointerIs64bit -body { - format "%zd %td %lld" [expr 2**33] [expr 2**33] [expr 2**33] + format "%zd %td %lld" [expr {2**33}] [expr {2**33}] [expr {2**33}] } -result {8589934592 8589934592 8589934592} # Since "%p" is equivalent to "%#llx" in 64-bit platforms and equivalent # to "%#x" in 32-bit platforms, it are really not useful in scripts, # therefore they are not documented. It's intended use is through the # function Tcl_AppendPrintfToObj (et al). test format-8.26 {Undocumented formats} -body { - format "%p %#x" [expr 2**31] [expr 2**31] + format "%p %#x" [expr {2**31}] [expr {2**31}] } -result {0x80000000 0x80000000} test format-8.27 {Undocumented formats} -constraints pointerIs64bit -body { - format "%p %#llx" [expr 2**33] [expr 2**33] + format "%p %#llx" [expr {2**33}] [expr {2**33}] } -result {0x200000000 0x200000000} test format-9.1 {long result} { @@ -469,7 +469,7 @@ test format-13.1 {tcl_precision fuzzy comparison} { set a 0.0000000000001 set b 0.00000000000001 set c 0.00000000000000001 - set d [expr $a + $b + $c] + set d [expr {$a + $b + $c}] format {%0.10f %0.12f %0.15f %0.17f} $d $d $d $d } {0.0000000000 0.000000000000 0.000000000000110 0.00000000000011001} test format-13.2 {tcl_precision fuzzy comparison} { @@ -480,7 +480,7 @@ test format-13.2 {tcl_precision fuzzy comparison} { set a 0.000000000001 set b 0.000000000000005 set c 0.0000000000000008 - set d [expr $a + $b + $c] + set d [expr {$a + $b + $c}] format {%0.10f %0.12f %0.15f %0.17f} $d $d $d $d } {0.0000000000 0.000000000001 0.000000000001006 0.00000000000100580} test format-13.3 {tcl_precision fuzzy comparison} { @@ -489,7 +489,7 @@ test format-13.3 {tcl_precision fuzzy comparison} { catch {unset c} set a 0.00000000000099 set b 0.000000000000011 - set c [expr $a + $b] + set c [expr {$a + $b}] format {%0.10f %0.12f %0.15f %0.17f} $c $c $c $c } {0.0000000000 0.000000000001 0.000000000001001 0.00000000000100100} test format-13.4 {tcl_precision fuzzy comparison} { @@ -498,7 +498,7 @@ test format-13.4 {tcl_precision fuzzy comparison} { catch {unset c} set a 0.444444444444 set b 0.33333333333333 - set c [expr $a + $b] + set c [expr {$a + $b}] format {%0.10f %0.12f %0.15f %0.16f} $c $c $c $c } {0.7777777778 0.777777777777 0.777777777777330 0.7777777777773300} test format-13.5 {tcl_precision fuzzy comparison} { @@ -507,7 +507,7 @@ test format-13.5 {tcl_precision fuzzy comparison} { catch {unset c} set a 0.444444444444 set b 0.99999999999999 - set c [expr $a + $b] + set c [expr {$a + $b}] format {%0.10f %0.12f %0.15f} $c $c $c } {1.4444444444 1.444444444444 1.444444444443990} @@ -543,7 +543,7 @@ for {set i 0} {$i < 290} {incr i} { append b $a } for {set i 290} {$i < 400} {incr i} { - test format-16.[expr $i -289] {testing MAX_FLOAT_SIZE} { + test format-16.[expr {$i -289}] {testing MAX_FLOAT_SIZE} { format {%s} $b } $b append b "x" diff --git a/tests/info.test b/tests/info.test index 7aaffc1..d9a4f54 100644 --- a/tests/info.test +++ b/tests/info.test @@ -657,7 +657,7 @@ test info-19.6 {info vars: Bug 1072654} -setup { set functions {abs acos asin atan atan2 bool ceil cos cosh double entier exp floor fmod hypot int isfinite isinf isnan isnormal isqrt issubnormal isunordered log log10 max min pow rand round sin sinh sqrt srand tan tanh wide} # Check whether the extra testing functions are defined... -if {!([catch {expr T1()} msg] && ($msg eq {invalid command name "tcl::mathfunc::T1"}))} { +if {!([catch {expr {T1()}} msg] && ($msg eq {invalid command name "tcl::mathfunc::T1"}))} { set functions "T1 T2 T3 $functions" ;# A lazy way of prepending! } test info-20.1 {info functions option} {info functions sin} sin diff --git a/tests/io.test b/tests/io.test index af778ef..0d75116 100644 --- a/tests/io.test +++ b/tests/io.test @@ -1943,11 +1943,11 @@ test io-17.1 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} eof stdin interp create x set l "" - lappend l [expr [testchannel refcount stdin] - $l1] + lappend l [expr {[testchannel refcount stdin] - $l1}] x eval {eof stdin} - lappend l [expr [testchannel refcount stdin] - $l1] + lappend l [expr {[testchannel refcount stdin] - $l1}] interp delete x - lappend l [expr [testchannel refcount stdin] - $l1] + lappend l [expr {[testchannel refcount stdin] - $l1}] set l } {0 1 0} test io-17.2 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} { @@ -1955,11 +1955,11 @@ test io-17.2 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} eof stdin interp create x set l "" - lappend l [expr [testchannel refcount stdout] - $l1] + lappend l [expr {[testchannel refcount stdout] - $l1}] x eval {eof stdout} - lappend l [expr [testchannel refcount stdout] - $l1] + lappend l [expr {[testchannel refcount stdout] - $l1}] interp delete x - lappend l [expr [testchannel refcount stdout] - $l1] + lappend l [expr {[testchannel refcount stdout] - $l1}] set l } {0 1 0} test io-17.3 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} { @@ -1967,11 +1967,11 @@ test io-17.3 {GetChannelTable, DeleteChannelTable on std handles} {testchannel} eof stdin interp create x set l "" - lappend l [expr [testchannel refcount stderr] - $l1] + lappend l [expr {[testchannel refcount stderr] - $l1}] x eval {eof stderr} - lappend l [expr [testchannel refcount stderr] - $l1] + lappend l [expr {[testchannel refcount stderr] - $l1}] interp delete x - lappend l [expr [testchannel refcount stderr] - $l1] + lappend l [expr {[testchannel refcount stderr] - $l1}] set l } {0 1 0} @@ -2161,7 +2161,7 @@ test io-26.1 {Tcl_GetChannelInstanceData} stdio { # Don't care what pid is (but must be a number), just want to exercise it. set f [open "|[list [interpreter] << exit]"] - expr [pid $f] + expr {[pid $f]} close $f } {} @@ -3162,7 +3162,7 @@ test io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} { set c [read $f] close $f string length $c -} [expr 700*15+1] +} [expr {700*15+1}] test io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} { file delete $path(test1) set f [open $path(test1) w] @@ -3178,7 +3178,7 @@ test io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} { set c [read $f] close $f string length $c -} [expr 700*15+1] +} [expr {700*15+1}] test io-30.15 {Tcl_Write mixed, Tcl_Read auto} { file delete $path(test1) set f [open $path(test1) w] @@ -3996,7 +3996,7 @@ test io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} { } close $f string length $c -} [expr 700*15+1] +} [expr {700*15+1}] test io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} { file delete $path(test1) set f [open $path(test1) w] @@ -4015,7 +4015,7 @@ test io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} { } close $f string length $c -} [expr 700*15+1] +} [expr {700*15+1}] # Test Tcl_Read and buffering. @@ -5641,7 +5641,7 @@ test io-40.2 {POSIX open access modes: CREAT} {unix} { file delete $path(test3) set f [open $path(test3) {WRONLY CREAT} 0o600] file stat $path(test3) stats - set x [format "%#o" [expr $stats(mode)&0o777]] + set x [format "%#o" [expr {$stats(mode)&0o777}]] puts $f "line 1" close $f set f [open $path(test3) r] @@ -5655,7 +5655,7 @@ test io-40.3 {POSIX open access modes: CREAT} {unix umask} { set f [open $path(test3) {WRONLY CREAT}] close $f file stat $path(test3) stats - format 0o%03o [expr $stats(mode)&0o777] + format 0o%03o [expr {$stats(mode)&0o777}] } [format 0o%03o [expr {0o666 & ~ $umaskValue}]] test io-40.4 {POSIX open access modes: CREAT} { file delete $path(test3) @@ -7157,7 +7157,7 @@ test io-52.6 {TclCopyChannel} {fcopy} { set f2 [open $path(test1) w] fconfigure $f1 -translation lf -blocking 0 fconfigure $f2 -translation lf -blocking 0 - set s0 [fcopy $f1 $f2 -size [expr [file size $thisScript] + 5]] + set s0 [fcopy $f1 $f2 -size [expr {[file size $thisScript] + 5}]] set result [list [fconfigure $f1 -blocking] [fconfigure $f2 -blocking]] close $f1 close $f2 @@ -7653,7 +7653,7 @@ test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio fcopy} { catch {close $in} close $out # -1=error 0=script error N=number of bytes - expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1 + expr {($fcopyTestDone == 0) ? $fcopyTestCount : -1} } {3450} test io-53.8 {CopyData: async callback and error handling, Bug 1932639} -setup { # copy progress callback. errors out intentionally diff --git a/tests/lmap.test b/tests/lmap.test index 7a802a8..f1cbd4b 100644 --- a/tests/lmap.test +++ b/tests/lmap.test @@ -357,7 +357,7 @@ test lmap-7.2 {noncompiled lmap and shared variable or value list objects that a } -body { lmap {12.0} {a b c} { set x 12.0 - set x [expr $x + 1] + set x [expr {$x + 1}] } } -result {13.0 13.0 13.0} # Test for incorrect "double evaluation" semantics diff --git a/tests/parse.test b/tests/parse.test index 1dd3bfc..d655478 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -278,7 +278,7 @@ test parse-6.9 {ParseTokens procedure, error in command substitution} { } {0} test parse-6.10 {ParseTokens procedure, incomplete sub-command} { info complete {puts [ - expr 1+1 + expr {1+1} #this is a comment ]} } {0} test parse-6.11 {ParseTokens procedure, memory allocation for big nested command} testparser { @@ -485,7 +485,7 @@ test parse-10.3 {Tcl_EvalTokens, nested commands} testevalex { } {8} test parse-10.4 {Tcl_EvalTokens, nested commands} testevalex { unset -nocomplain a - list [catch {testevalex {concat xxx[expr $a]}} msg] $msg + list [catch {testevalex {concat xxx[expr {$a}]}} msg] $msg } {1 {can't read "a": no such variable}} test parse-10.5 {Tcl_EvalTokens, simple variables} testevalex { set a hello @@ -518,7 +518,7 @@ test parse-10.11 {Tcl_EvalTokens, object values} testevalex { testevalex {concat $a$a$a} } {123123123} test parse-10.12 {Tcl_EvalTokens, object values} testevalex { - testevalex {concat [expr 2][expr 4][expr 6]} + testevalex {concat [expr {2}][expr {4}][expr {6}]} } {246} test parse-10.13 {Tcl_EvalTokens, string values} testevalex { testevalex {concat {a" b"}} @@ -984,26 +984,26 @@ test parse-18.14 {Tcl_SubstObj, exception handling} { subst {abc,[break],def} } {abc,} test parse-18.15 {Tcl_SubstObj, exception handling} { - subst {abc,[continue; expr 1+2],def} + subst {abc,[continue; expr {1+2}],def} } {abc,,def} test parse-18.16 {Tcl_SubstObj, exception handling} { - subst {abc,[return foo; expr 1+2],def} + subst {abc,[return foo; expr {1+2}],def} } {abc,foo,def} test parse-18.17 {Tcl_SubstObj, exception handling} { - subst {abc,[return -code 10 foo; expr 1+2],def} + subst {abc,[return -code 10 foo; expr {1+2}],def} } {abc,foo,def} test parse-18.18 {Tcl_SubstObj, exception handling} { subst {abc,[break; set {} {}{}],def} } {abc,} test parse-18.19 {Tcl_SubstObj, exception handling} { - list [catch {subst {abc,[continue; expr 1+2; set {} {}{}],def}} msg] $msg + list [catch {subst {abc,[continue; expr {1+2}; set {} {}{}],def}} msg] $msg } [list 1 "extra characters after close-brace"] test parse-18.20 {Tcl_SubstObj, exception handling} { - list [catch {subst {abc,[return foo; expr 1+2; set {} {}{}],def}} msg] $msg + list [catch {subst {abc,[return foo; expr {1+2}; set {} {}{}],def}} msg] $msg } [list 1 "extra characters after close-brace"] test parse-18.21 {Tcl_SubstObj, exception handling} { list [catch { - subst {abc,[return -code 10 foo; expr 1+2; set {} {}{}],def} + subst {abc,[return -code 10 foo; expr {1+2}; set {} {}{}],def} } msg] $msg } [list 1 "extra characters after close-brace"] diff --git a/tests/parseOld.test b/tests/parseOld.test index 8a58fbb..f8caf24 100644 --- a/tests/parseOld.test +++ b/tests/parseOld.test @@ -455,14 +455,14 @@ test parseOld-12.4 {comments} { test parseOld-13.1 {comments at the end of a bracketed script} { set x "[ -expr 1+1 +expr {1+1} # skip this! ]" } {2} test parseOld-15.1 {TclScriptEnd procedure} { info complete {puts [ - expr 1+1 + expr {1+1} #this is a comment ]} } {0} test parseOld-15.2 {TclScriptEnd procedure} { diff --git a/tests/string.test b/tests/string.test index 644ddec..b120a65 100644 --- a/tests/string.test +++ b/tests/string.test @@ -592,7 +592,7 @@ test string-6.27.$noComp {string is double, true} { run {string is double 1} } 1 test string-6.28.$noComp {string is double, true} { - run {string is double [expr double(1)]} + run {string is double [expr {double(1)}]} } 1 test string-6.29.$noComp {string is double, true} { run {string is double 1.0} @@ -667,7 +667,7 @@ test string-6.48.$noComp {string is integer, true} { run {string is integer +1234567890} } 1 test string-6.49.$noComp {string is integer, true on type} { - run {string is integer [expr int(50.0)]} + run {string is integer [expr {int(50.0)}]} } 1 test string-6.50.$noComp {string is integer, true} { run {string is integer [list -10]} @@ -688,7 +688,7 @@ test string-6.55.$noComp {string is integer, no overflow possible} { run {string is integer +9223372036854775808} } 1 test string-6.56.$noComp {string is integer, false} { - list [run {string is integer -fail var [expr double(1)]}] $var + list [run {string is integer -fail var [expr {double(1)}]}] $var } {0 1} test string-6.57.$noComp {string is integer, false} { list [run {string is integer -fail var " "}] $var @@ -837,7 +837,7 @@ test string-6.95.$noComp {string is wideinteger, true} { run {string is wideinteger +1234567890} } 1 test string-6.96.$noComp {string is wideinteger, true on type} { - run {string is wideinteger [expr wide(50.0)]} + run {string is wideinteger [expr {wide(50.0)}]} } 1 test string-6.97.$noComp {string is wideinteger, true} { run {string is wideinteger [list -10]} @@ -858,7 +858,7 @@ test string-6.102.$noComp {string is wideinteger, false on overflow} { list [run {string is wideinteger -fail var +9223372036854775808}] $var } {0 -1} test string-6.103.$noComp {string is wideinteger, false} { - list [run {string is wideinteger -fail var [expr double(1)]}] $var + list [run {string is wideinteger -fail var [expr {double(1)}]}] $var } {0 1} test string-6.104.$noComp {string is wideinteger, false} { list [run {string is wideinteger -fail var " "}] $var @@ -893,7 +893,7 @@ test string-6.110.$noComp {string is entier, true} { run {string is entier +1234567890} } 1 test string-6.111.$noComp {string is entier, true on type} { - run {string is entier [expr wide(50.0)]} + run {string is entier [expr {wide(50.0)}]} } 1 test string-6.112.$noComp {string is entier, true} { run {string is entier [list -10]} @@ -914,7 +914,7 @@ test string-6.117.$noComp {string is entier, false} { list [run {string is entier -fail var 123123123123123123123123123123123123123123123123123123123123123123123123123123123123abc}] $var } {0 84} test string-6.118.$noComp {string is entier, false} { - list [run {string is entier -fail var [expr double(1)]}] $var + list [run {string is entier -fail var [expr {double(1)}]}] $var } {0 1} test string-6.119.$noComp {string is entier, false} { list [run {string is entier -fail var " "}] $var diff --git a/tests/util.test b/tests/util.test index a184407..52e76ae 100644 --- a/tests/util.test +++ b/tests/util.test @@ -102,7 +102,7 @@ proc verdonk_test {sig binexp shouldbe exp} { regexp {([-+]?)([0-9a-f]+)} $sig -> signum sig scan $sig %llx sig if {$signum eq {-}} { - set signum [expr 1<<63] + set signum [expr {1<<63}] } else { set signum 0 } @@ -390,10 +390,10 @@ test util-5.52 {Tcl_StringMatch} { test util-6.5 {Tcl_PrintDouble - make sure there's a decimal point} { - concat x[expr 2.0] + concat x[expr {2.0}] } {x2.0} test util-6.6 {Tcl_PrintDouble - make sure there's a decimal point} { - concat x[expr 3.0e98] + concat x[expr {3.0e98}] } {x3e+98} # This test always succeeded in the C locale anyway... @@ -1111,73 +1111,73 @@ test util-10.122 {Tcl_PrintDouble - rounding} {ieeeFloatingPoint} { } {5.20831059055e+36} test util-11.1 {Tcl_PrintDouble - scaling} { - expr 1.1e-5 + expr {1.1e-5} } {1.1e-5} test util-11.2 {Tcl_PrintDouble - scaling} { - expr 1.1e-4 + expr {1.1e-4} } {0.00011} test util-11.3 {Tcl_PrintDouble - scaling} { - expr 1.1e-3 + expr {1.1e-3} } {0.0011} test util-11.4 {Tcl_PrintDouble - scaling} { - expr 1.1e-2 + expr {1.1e-2} } {0.011} test util-11.5 {Tcl_PrintDouble - scaling} { - expr 1.1e-1 + expr {1.1e-1} } {0.11} test util-11.6 {Tcl_PrintDouble - scaling} { - expr 1.1e0 + expr {1.1e0} } {1.1} test util-11.7 {Tcl_PrintDouble - scaling} { - expr 1.1e1 + expr {1.1e1} } {11.0} test util-11.8 {Tcl_PrintDouble - scaling} { - expr 1.1e2 + expr {1.1e2} } {110.0} test util-11.9 {Tcl_PrintDouble - scaling} { - expr 1.1e3 + expr {1.1e3} } {1100.0} test util-11.10 {Tcl_PrintDouble - scaling} { - expr 1.1e4 + expr {1.1e4} } {11000.0} test util-11.11 {Tcl_PrintDouble - scaling} { - expr 1.1e5 + expr {1.1e5} } {110000.0} test util-11.12 {Tcl_PrintDouble - scaling} { - expr 1.1e6 + expr {1.1e6} } {1100000.0} test util-11.13 {Tcl_PrintDouble - scaling} { - expr 1.1e7 + expr {1.1e7} } {11000000.0} test util-11.14 {Tcl_PrintDouble - scaling} { - expr 1.1e8 + expr {1.1e8} } {110000000.0} test util-11.15 {Tcl_PrintDouble - scaling} { - expr 1.1e9 + expr {1.1e9} } {1100000000.0} test util-11.16 {Tcl_PrintDouble - scaling} { - expr 1.1e10 + expr {1.1e10} } {11000000000.0} test util-11.17 {Tcl_PrintDouble - scaling} { - expr 1.1e11 + expr {1.1e11} } {110000000000.0} test util-11.18 {Tcl_PrintDouble - scaling} { - expr 1.1e12 + expr {1.1e12} } {1100000000000.0} test util-11.19 {Tcl_PrintDouble - scaling} { - expr 1.1e13 + expr {1.1e13} } {11000000000000.0} test util-11.20 {Tcl_PrintDouble - scaling} { - expr 1.1e14 + expr {1.1e14} } {110000000000000.0} test util-11.21 {Tcl_PrintDouble - scaling} { - expr 1.1e15 + expr {1.1e15} } {1100000000000000.0} test util-11.22 {Tcl_PrintDouble - scaling} { - expr 1.1e16 + expr {1.1e16} } {11000000000000000.0} test util-11.23 {Tcl_PrintDouble - scaling} { - expr 1.1e17 + expr {1.1e17} } {1.1e+17} test util-12.1 {TclDoubleDigits - Inf} {testdoubledigits ieeeFloatingPoint} { @@ -2163,9 +2163,9 @@ test util-17.1 {bankers' rounding [Bug 3349507]} {ieeeFloatingPoint} { 0x1fffffffffffff000 0x1fffffffffffff800 } { - binary scan [binary format q [expr double($input)]] wu x + binary scan [binary format q [expr {double($input)}]] wu x lappend r [format %#llx $x] - binary scan [binary format q [expr double(-$input)]] wu x + binary scan [binary format q [expr {double(-$input)}]] wu x lappend r [format %#llx $x] } set r @@ -2181,39 +2181,39 @@ test util-17.1 {bankers' rounding [Bug 3349507]} {ieeeFloatingPoint} { }] test util-18.1 {Tcl_ObjPrintf} {testprint} { - testprint %lld [expr 2**63-1] + testprint %lld [expr {2**63-1}] } {9223372036854775807} test util-18.2 {Tcl_ObjPrintf} {testprint} { - testprint %I64d [expr 2**63-1] + testprint %I64d [expr {2**63-1}] } {9223372036854775807} test util-18.3 {Tcl_ObjPrintf} {testprint} { - testprint %qd [expr 2**63-1] + testprint %qd [expr {2**63-1}] } {9223372036854775807} test util-18.4 {Tcl_ObjPrintf} {testprint} { - testprint %jd [expr 2**63-1] + testprint %jd [expr {2**63-1}] } {9223372036854775807} test util-18.5 {Tcl_ObjPrintf} {testprint} { - testprint %lld [expr -2**63] + testprint %lld [expr {-2**63}] } {-9223372036854775808} test util-18.6 {Tcl_ObjPrintf} {testprint} { - testprint %I64d [expr -2**63] + testprint %I64d [expr {-2**63}] } {-9223372036854775808} test util-18.7 {Tcl_ObjPrintf} {testprint} { - testprint %qd [expr -2**63] + testprint %qd [expr {-2**63}] } {-9223372036854775808} test util-18.8 {Tcl_ObjPrintf} {testprint} { - testprint %jd [expr -2**63] + testprint %jd [expr {-2**63}] } {-9223372036854775808} test util-18.9 {Tcl_ObjPrintf} {testprint} { - testprint "%I64d %I32d" [expr -2**63+2] + testprint "%I64d %I32d" [expr {-2**63+2}] } {-9223372036854775806 2} test util-18.10 {Tcl_ObjPrintf} {testprint} { |