From 80eca273f4b974b66e91dade8b680590398338c4 Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 18 Nov 2010 10:10:13 +0000 Subject: * tests/oo.test: [Bug 3111059]: Added testing that neatly trapped this issue. --- ChangeLog | 25 +++++++++++++++---------- tests/oo.test | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index f32e04a..63ca8a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,26 +1,31 @@ +2010-11-18 Donal K. Fellows + + * tests/oo.test: [Bug 3111059]: Added testing that neatly trapped this + issue. + 2010-11-18 Miguel Sofer - * generic/tclNamesp.c: fix leak due to bad looping construct, - [Bug 3111059] + * generic/tclNamesp.c: [Bug 3111059]: Fix leak due to bad looping + construct. 2010-11-17 Jan Nijtmans - * win/tcl.m4: [FRQ 491789]: "setargv() doesn't support a - unicode cmdline" now implemented for mingw-w64 + * win/tcl.m4: [FRQ 491789]: "setargv() doesn't support a unicode + cmdline" now implemented for mingw-w64 * win/configure (re-generated) 2010-11-16 Jan Nijtmans - * win/tclAppInit.c Bring compilation under mingw-w64 a bit closer - * win/cat.c to reality. See for what's missing: - * win/tcl.m4 - * win/configure (re-generated) - * win/tclWinPort.h [Bug #3110161]: Extensions using TCHAR don't compile + * win/tclAppInit.c:Bring compilation under mingw-w64 a bit closer + * win/cat.c: to reality. See for what's missing: + * win/tcl.m4: + * win/configure: (re-generated) + * win/tclWinPort.h:[Bug #3110161]: Extensions using TCHAR don't compile on VS2005 SP1 2010-11-15 Andreas Kupries - * doc/interp.n: [3081184] TIP #378. + * doc/interp.n: [Bug 3081184]: TIP #378. * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: diff --git a/tests/oo.test b/tests/oo.test index 4e3a42e..bea9e1a 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.41 2010/11/09 14:41:22 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.42 2010/11/18 10:10:14 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -2615,6 +2615,40 @@ test oo-30.2 {Bug 2903011: deleting an object in a constructor} -setup { } -returnCodes error -cleanup { cls destroy } -result {object deleted in constructor} + +test oo-31.1 {Bug 3111059: when objects and coroutines entangle} -setup { + oo::class create cls +} -constraints memory -body { + oo::define cls { + method justyield {} { + yield + } + constructor {} { + coroutine coro my justyield + } + } + list [leaktest {[cls new] destroy}] [info class instances cls] +} -cleanup { + cls destroy +} -result {0 {}} +test oo-31.2 {Bug 3111059: when objects and coroutines entangle} -setup { + oo::class create cls +} -constraints memory -body { + oo::define cls { + method justyield {} { + yield + } + constructor {} { + coroutine coro my justyield + } + destructor { + rename coro {} + } + } + list [leaktest {[cls new] destroy}] [info class instances cls] +} -cleanup { + cls destroy +} -result {0 {}} cleanupTests return -- cgit v0.12