diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-04 23:42:52 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-03-04 23:42:52 (GMT) |
commit | 8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72 (patch) | |
tree | 7df7890a99597754e9b18126fc1ce888486901de /tests/oo.test | |
parent | f9102947da376b595e386d9bc0e443bf45b39110 (diff) | |
download | tcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.zip tcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.tar.gz tcl-8a4b2ce65944b09d87fb02f51dc1ac2346ac9c72.tar.bz2 |
Fix [Bug 2962664] by forcing oo::object deletion on oo::class deletion.
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test index fbb8971..adcab4b 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.37 2010/02/15 11:53:45 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.38 2010/03/04 23:42:54 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -72,6 +72,30 @@ test oo-0.5 {testing literal leak on interp delete} memory { interp delete foo } } 0 +test oo-0.6 {cleaning the core class pair; way #1} -setup { + interp create t + initInterpreter t +} -body { + t eval { + package require TclOO + namespace path oo + list [catch {class destroy} m] $m [catch {object destroy} m] $m + } +} -cleanup { + interp delete t +} -result {0 {} 1 {invalid command name "object"}} +test oo-0.7 {cleaning the core class pair; way #2} -setup { + interp create t + initInterpreter t +} -body { + t eval { + package require TclOO + namespace path oo + list [catch {object destroy} m] $m [catch {class destroy} m] $m + } +} -cleanup { + interp delete t +} -result {0 {} 1 {invalid command name "class"}} test oo-1.1 {basic test of OO functionality: no classes} { set result {} |