diff options
author | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:01:13 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-01-10 22:01:13 (GMT) |
commit | 980f0e3d6b56fbddec0b97988c695f912caa5082 (patch) | |
tree | 8052cb6af5c5416aaa0fcd000063db369c21cb53 /tests-perf | |
parent | 0e260c3cee3072b0b318b96c63a6242dec096972 (diff) | |
download | tcl-980f0e3d6b56fbddec0b97988c695f912caa5082.zip tcl-980f0e3d6b56fbddec0b97988c695f912caa5082.tar.gz tcl-980f0e3d6b56fbddec0b97988c695f912caa5082.tar.bz2 |
[temp-commit]: ClockFreeScan seems to be ready, test case should be checked
Diffstat (limited to 'tests-perf')
-rw-r--r-- | tests-perf/clock.perf.tcl | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl index 2e77a26..52bc91f 100644 --- a/tests-perf/clock.perf.tcl +++ b/tests-perf/clock.perf.tcl @@ -19,6 +19,18 @@ proc test-scan {{rep 100000}} { foreach {comment c} { "# FreeScan : relative date" {clock scan "5 years 18 months 385 days" -base 0 -gmt 1} + "# FreeScan : relative date with relative weekday" + {clock scan "5 years 18 months 385 days Fri" -base 0 -gmt 1} + "# FreeScan : relative date with ordinal month" + {clock scan "5 years 18 months 385 days next 1 January" -base 0 -gmt 1} + "# FreeScan : relative date with ordinal month and relative weekday" + {clock scan "5 years 18 months 385 days next January Fri" -base 0 -gmt 1} + "# FreeScan : ordinal month" + {clock scan "next January" -base 0 -gmt 1} + "# FreeScan : relative week" + {clock scan "next Fri" -base 0 -gmt 1} + "# FreeScan : relative weekday and week offset " + {clock scan "next January + 2 week" -base 0 -gmt 1} "# FreeScan : time only with base" {clock scan "19:18:30" -base 148863600 -gmt 1} "# FreeScan : time only without base" @@ -34,8 +46,9 @@ proc test-scan {{rep 100000}} { "# FreeScan : time only, zone in string (exchange zones between system / gmt)" {clock scan "19:18:30 GMT" -base 148863600} } { + if {[string first "**STOP**" $comment] != -1} { return -code error "**STOP**" } puts "\n% $comment\n% $c" - puts [clock format [{*}$c]] + puts [clock format [{*}$c] -locale en] puts [time $c $rep] } } @@ -45,15 +58,17 @@ proc test-other {{rep 100000}} { "# Bad zone" {catch {clock scan "1 day" -timezone BAD_ZONE}} } { + if {[string first "**STOP**" $comment] != -1} { return -code error "**STOP**" } puts "\n% $comment\n% $c" puts [if 1 $c] puts [time $c $rep] } } +set factor 10; # 50 if 1 {;# - test-scan 100000 - test-other 50000 + test-scan [expr 10000 * $factor] + test-other [expr 5000 * $factor] puts \n**OK** };#
\ No newline at end of file |