summaryrefslogtreecommitdiffstats
path: root/tests/cmdMZ.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-07-23 17:40:25 (GMT)
committersebres <sebres@users.sourceforge.net>2019-07-23 17:40:25 (GMT)
commit566263fc9aa031a879c81285f1a8a966590dcddd (patch)
tree32aa50c5a498fdc1e4eb9fd47f3d41a890a43aef /tests/cmdMZ.test
parent8e0fbdb4c108cf1264038ee6994c693f90699634 (diff)
downloadtcl-566263fc9aa031a879c81285f1a8a966590dcddd.zip
tcl-566263fc9aa031a879c81285f1a8a966590dcddd.tar.gz
tcl-566263fc9aa031a879c81285f1a8a966590dcddd.tar.bz2
better rewritten loop optimization: new evalFlag "TCL_EVAL_DISCARD_RESULT" introduced, which allows to organize faster TEBC-loop
with discarding of result, simulating pop & done, like it does continue in loop (so ensures that setting of result will not smudge the measurement).
Diffstat (limited to 'tests/cmdMZ.test')
-rw-r--r--tests/cmdMZ.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 4286bbb..1157ada 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -353,6 +353,11 @@ test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} {
"error foo"
invoked from within
"time {error foo}"}}
+test cmdMZ-5.7.1 {Tcl_TimeObjCmd: return from time} {
+ set x 0
+ proc r1 {} {upvar x x; time {incr x; return "r1"; incr x} 10}
+ list [r1] $x
+} {r1 1}
test cmdMZ-6.1 {Tcl_TimeRateObjCmd: basic format of command} {
list [catch {timerate} msg] $msg
@@ -399,6 +404,11 @@ test cmdMZ-6.7 {Tcl_TimeRateObjCmd: errors generate right trace} {
"error foo"
invoked from within
"timerate {error foo} 1"}}
+test cmdMZ-6.7.1 {Tcl_TimeRateObjCmd: return from timerate} {
+ set x 0
+ proc r1 {} {upvar x x; timerate {incr x; return "r1"; incr x} 1000 10}
+ list [r1] $x
+} {r1 1}
test cmdMZ-6.8 {Tcl_TimeRateObjCmd: allow (conditional) break from timerate} {
set m1 [timerate {break}]
list \