Tcl Source Code

Check-in [f3d1a24b0e]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:small amend (correct wrong utf-8 prevention for micro sign in RE of check test-case)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sebres-8-5-timerate
Files: files | file ages | folders
SHA3-256: f3d1a24b0e1a0eee1a32d31fbe325beb7c838a23eccb8de3973f0f42d9821535
User & Date: sergey.brester 2019-02-12 20:40:12
Context
2019-02-13
01:10
timerate: extended with ?max-count? optional parameter, code review and more tests check-in: 0f6e941c6e user: sebres tags: sebres-8-5-timerate
2019-02-12
20:40
small amend (correct wrong utf-8 prevention for micro sign in RE of check test-case) check-in: f3d1a24b0e user: sergey.brester tags: sebres-8-5-timerate
20:37
few test cases for timerate command check-in: e7400f99d5 user: sergey.brester tags: sebres-8-5-timerate
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/cmdMZ.test.

356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
test cmdMZ-6.3 {Tcl_TimeRateObjCmd: basic format of command} {
    list [catch {timerate a b} msg] $msg
} {1 {expected integer but got "b"}}
test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative iteration counts} {
    list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg
} {1 {missing close-brace}}
test cmdMZ-6.5 {Tcl_TimeRateObjCmd: result format and one iteration} {
    regexp {^\d+.\d+ [.]s/# 1 # \d+ #/sec \d+.\d+ nett-ms$} [timerate {} 0]
} 1
test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
    set m1 [timerate {after 0} 20]
    set m2 [timerate {after 1} 20]
    list \
	[expr {[lindex $m1 0] < [lindex $m2 0]}] \
	[expr {[lindex $m1 0] < 100}] \






|







356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
test cmdMZ-6.3 {Tcl_TimeRateObjCmd: basic format of command} {
    list [catch {timerate a b} msg] $msg
} {1 {expected integer but got "b"}}
test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative iteration counts} {
    list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg
} {1 {missing close-brace}}
test cmdMZ-6.5 {Tcl_TimeRateObjCmd: result format and one iteration} {
    regexp {^\d+.\d+ \ws/# 1 # \d+ #/sec \d+.\d+ nett-ms$} [timerate {} 0]
} 1
test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
    set m1 [timerate {after 0} 20]
    set m2 [timerate {after 1} 20]
    list \
	[expr {[lindex $m1 0] < [lindex $m2 0]}] \
	[expr {[lindex $m1 0] < 100}] \