diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-05-08 08:48:19 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-05-08 08:48:19 (GMT) |
commit | 8e841a82ee24a19f46b5242cc2a989361da94dd9 (patch) | |
tree | 02c103233e67d5211073223af43b8ae52e97efdc /tests/oo.test | |
parent | 0aacbdde5731d13b37f89453b2c72c1ff5250a51 (diff) | |
download | tcl-8e841a82ee24a19f46b5242cc2a989361da94dd9.zip tcl-8e841a82ee24a19f46b5242cc2a989361da94dd9.tar.gz tcl-8e841a82ee24a19f46b5242cc2a989361da94dd9.tar.bz2 |
Fix [Bug 2414858].
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/oo.test b/tests/oo.test index 6b81f37..c8957b3 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.25 2009/04/11 11:18:51 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.26 2009/05/08 08:48:19 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -278,10 +278,21 @@ test oo-2.5 {OO constructor - Bug 2531577} -setup { } -cleanup { foo destroy } -result {1 1} +test oo-2.6 {OO constructor and tailcall - Bug 2414858} -setup { + oo::class create foo +} -body { + oo::define foo { + constructor {} { tailcall my bar } + method bar {} { return bad } + } + namespace tail [foo create good] +} -cleanup { + foo destroy +} -result good test oo-3.1 {basic test of OO functionality: destructor} -setup { - # This is a bit complex because it needs to run in a sub-interp as - # we're modifying the root object class's constructor + # This is a bit complex because it needs to run in a sub-interp as we're + # modifying the root object class's constructor interp create subinterp initInterpreter subinterp subinterp eval { |