diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-01-24 12:00:22 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:43 +1000 |
commit | 2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66 (patch) | |
tree | d37b63d50fea502fe61b98943ca380a4aa4d053d /tests | |
parent | 17b0f14f5e17efb7e70e47e711c6339e524875f8 (diff) | |
download | jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.zip jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.tar.gz jimtcl-2ae1c01c1b0b7d24fa2eeff3545b375d25c18c66.tar.bz2 |
Simplify expr evaluation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/case.test | 6 | ||||
-rw-r--r-- | tests/perf.test | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/case.test b/tests/case.test index 1973477..ce6075a 100644 --- a/tests/case.test +++ b/tests/case.test @@ -55,10 +55,10 @@ proc do_case {var} { return two } 3 { - return 33 + continue } 4 { - continue + return 44 } 5 { break @@ -76,5 +76,5 @@ test control-2.1 "Return from case" { lappend result [do_case $i] } set result -} {zero one two 33} +} {zero one two 44} diff --git a/tests/perf.test b/tests/perf.test index fd28dff..e792c96 100644 --- a/tests/perf.test +++ b/tests/perf.test @@ -1,3 +1,5 @@ +set iterations 10000 + set version [info patchlevel] proc bench {name cmd} { @@ -11,7 +13,7 @@ proc bench {name cmd} { } proc set_dict_sugar {} { - for {set i 0} {$i < 10000} {incr i} { + for {set i 0} {$i < $::iterations} {incr i} { set a(b) $i } } @@ -20,7 +22,7 @@ proc set_dict_sugar {} { # speedup since a($b) needs to be interpolated and reparsed every time proc set_var_dict_sugar {} { set b b - for {set i 0} {$i < 10000} {incr i} { + for {set i 0} {$i < $::iterations} {incr i} { set a($b) $i } } @@ -102,7 +104,7 @@ proc read_file_split_assign_lindex {file} { # Create a really big file set f [open test.in w] -for {set i 0} {$i < 10000} {incr i} { +for {set i 0} {$i < $::iterations} {incr i} { puts $f "a\tb\tc\te\tf\tg\th\ti\tj\tk" } close $f |