Diff
Not logged in

Differences From Artifact [8298f45f1a]:

To Artifact [4113121621]:


379
380
381
382
383
384
385

386
387
388
389
390
391
392
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393







+







test util-5.50 {Tcl_StringMatch} {
    Wrapper_Tcl_StringMatch *. ""
} 0
test util-5.51 {Tcl_StringMatch} {
    Wrapper_Tcl_StringMatch "" ""
} 1

if 0 {
test util-6.1 {Tcl_PrintDouble - using tcl_precision} -setup {
    set old_precision $::tcl_precision
    set ::tcl_precision 12
} -body {
    concat x[expr 1.4]
} -cleanup {
    set ::tcl_precision $old_precision
411
412
413
414
415
416
417

418
419
420
421
422
423
424

425
426
427
428
429
430
431
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434







+







+







    set old_precision $::tcl_precision
    set ::tcl_precision 5
} -body {
    concat x[expr 1.123412341234]
} -cleanup {
    set tcl_precision $old_precision
} -result {x1.1234}
}
test util-6.5 {Tcl_PrintDouble - make sure there's a decimal point} {
    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]
} {x3e+98}

if 0 {
test util-7.1 {TclPrecTraceProc - unset callbacks} -setup {
    set old_precision $::tcl_precision
} -body {
    set tcl_precision 7
    set x $tcl_precision
    unset tcl_precision
    list $x $tcl_precision
461
462
463
464
465
466
467

468
469
470
471
472
473
474
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478







+







    set old_precision $::tcl_precision
} -body {
    set tcl_precision 12
    list [catch {set tcl_precision abc} msg] $msg $tcl_precision
} -cleanup {
    set ::tcl_precision $old_precision
} -result {1 {can't set "tcl_precision": improper value for precision} 12}
}

# This test always succeeded in the C locale anyway...
test util-8.1 {TclNeedSpace - correct UTF8 handling} {
    # Bug 411825
    # Note that this test relies on the fact that
    # [interp target] calls on Tcl_AppendElement()
    # which calls on TclNeedSpace().  If [interp target]
2114
2115
2116
2117
2118
2119
2120

2121
2122
2123
2124
2125
2126
2127
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132







+







    }
    -result 0x8010000000000000
    -cleanup {
	unset x
    }
}

if 0 {
set saved_precision $::tcl_precision
foreach ::tcl_precision {0 12} {
    for {set e -312} {$e < -9} {incr e} {
	test util-16.1.$::tcl_precision.$e {shortening of numbers} \
	    "expr 1.1e$e" 1.1e$e
    }
}
3982
3983
3984
3985
3986
3987
3988


3989
3990
3991
3992
3993
3994
3995
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002







+
+







    9.9999999999999994e+304
test util-16.1.17.306 {8.4 compatible formatting of doubles} \
    {expr 1e306} \
    1e+306
test util-16.1.17.307 {8.4 compatible formatting of doubles} \
    {expr 1e307} \
    9.9999999999999999e+306
set ::tcl_precision $saved_precision
}

test util-17.1 {bankers' rounding [Bug 3349507]} {ieeeFloatingPoint} {
    set r {}
    foreach {input} {
	0x1ffffffffffffc000
	0x1ffffffffffffc800
	0x1ffffffffffffd000
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4019
4020
4021
4022
4023
4024
4025

4026
4027
4028
4029
4030
4031
4032
4033







-








    0x43fffffffffffffe 0xc3fffffffffffffe
    0x43fffffffffffffe 0xc3fffffffffffffe
    0x43fffffffffffffe 0xc3fffffffffffffe
    0x43ffffffffffffff 0xc3ffffffffffffff
    0x4400000000000000 0xc400000000000000
}]

set ::tcl_precision $saved_precision

# cleanup
::tcltest::cleanupTests
return

# Local Variables:
# mode: tcl
# End: