diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-08-20 15:41:20 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-08-20 15:41:20 (GMT) |
commit | faa29c2fefd6d227c3dad33bb98df241a38006bf (patch) | |
tree | 47c02de5808411400f650d853de4bcf335527b8c /tests | |
parent | 37a1fa926eb75cc4aee1113d06f594adaa5e6f20 (diff) | |
download | tcl-faa29c2fefd6d227c3dad33bb98df241a38006bf.zip tcl-faa29c2fefd6d227c3dad33bb98df241a38006bf.tar.gz tcl-faa29c2fefd6d227c3dad33bb98df241a38006bf.tar.bz2 |
Fix performance bug introduced by fix of [Bug 2037727]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oo.test | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/tests/oo.test b/tests/oo.test index ea97bf2..3575511 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.10 2008/08/06 21:23:15 dgp Exp $ +# RCS: @(#) $Id: oo.test,v 1.11 2008/08/20 15:41:26 dkf Exp $ package require TclOO 0.4 ;# Must match value in configure.in if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1799,21 +1799,36 @@ test oo-26.1 {Bug 2037727} -setup { example destroy rename succeed {} } -result succeed - test oo-26.2 {Bug 2037727} -setup { oo::class create example { - method namespace {} {self namespace} - method foo {} {succeed} + method localProc {args body} {proc called $args $body} + method run {} { called } + } + example create i1 + example create i2 +} -body { + i1 localProc args {} + i2 localProc args {return nonempty} + list [i1 run] [i2 run] +} -cleanup { + example destroy +} -result {{} nonempty} +test oo-26.3 {Bug 2037727} -setup { + oo::class create example { + method subProc {args body} { + namespace eval subns [list proc called $args $body] + } + method run {} { subns::called } } example create i1 example create i2 - namespace eval [i1 namespace] {proc succeed args {}} - namespace eval [i2 namespace] {proc succeed args {return succeed}} } -body { - list [i1 foo] [i2 foo] + i1 subProc args {} + i2 subProc args {return nonempty} + list [i1 run] [i2 run] } -cleanup { example destroy -} -result {{} succeed} +} -result {{} nonempty} cleanupTests return |