summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordas <das>2008-08-09 00:16:06 (GMT)
committerdas <das>2008-08-09 00:16:06 (GMT)
commit1b56971b4efb064c4db68d06e0a589d76cecd202 (patch)
treefe9d6ec8908226ccd69c836273f55d41aaff0ba8 /tests
parent11ef0e666d8b0e8b4b098afaff89c54e923c7c7c (diff)
downloadtcl-1b56971b4efb064c4db68d06e0a589d76cecd202.zip
tcl-1b56971b4efb064c4db68d06e0a589d76cecd202.tar.gz
tcl-1b56971b4efb064c4db68d06e0a589d76cecd202.tar.bz2
(lrange-1.17): add test cleanup; whitespace
Diffstat (limited to 'tests')
-rw-r--r--tests/lrange.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lrange.test b/tests/lrange.test
index 443d8c9..f218d38 100644
--- a/tests/lrange.test
+++ b/tests/lrange.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: lrange.test,v 1.10 2008/07/23 22:50:42 ferrieux Exp $
+# RCS: @(#) $Id: lrange.test,v 1.11 2008/08/09 00:16:06 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -66,12 +66,12 @@ test lrange-1.15 {range of list elements} {
test lrange-1.16 {list element quoting} {
lrange {[append a .b]} 0 end
} {{[append} a .b\]}
-test lrange-1.17 {lrange in-place speed} {
- set l [lrepeat 1000000 1]
- set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0]
- set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0]
- expr {($t1/$t2)>100}
-} 1
+test lrange-1.17 {lrange in-place speed} -body {
+ set l [lrepeat 1000000 0]
+ set t1 [lindex [time {set l [lrange $l 0 end-1]}] 0]
+ set t2 [lindex [time {set l [lrange $l[unset l] 0 end-1]}] 0]
+ expr {($t1/$t2)>100}
+} -result 1 -cleanup {unset l t1 t2}
test lrange-2.1 {error conditions} {
list [catch {lrange a b} msg] $msg
} {1 {wrong # args: should be "lrange list first last"}}