diff options
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/oo.test b/tests/oo.test index c8957b3..da295a6 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.26 2009/05/08 08:48:19 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.27 2009/05/15 10:08:02 dkf Exp $ package require TclOO 0.6.1 ;# Must match value in generic/tclOO.h if {[lsearch [namespace children] ::tcltest] == -1} { @@ -1319,7 +1319,7 @@ test oo-16.2 {OO: object introspection} -body { } -returnCodes 1 -result {NOTANOBJECT does not refer to an object} test oo-16.3 {OO: object introspection} -body { info object gorp oo::object -} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, variables, or vars} +} -returnCodes 1 -result {unknown or ambiguous subcommand "gorp": must be class, definition, filters, forward, isa, methods, mixins, namespace, variables, or vars} test oo-16.4 {OO: object introspection} -setup { oo::class create meta { superclass oo::class } [meta create instance1] create instance2 @@ -1416,6 +1416,14 @@ test oo-16.12 {OO: object introspection} -setup { oo::objdefine foo unexport {*}[info object methods foo -all] info object methods foo -all } -result {} +test oo-16.13 {OO: object introspection} -setup { + oo::object create foo +} -cleanup { + rename foo {} +} -body { + oo::objdefine foo method Bar {} {return "ok in foo"} + [info object namespace foo]::my Bar +} -result "ok in foo" test oo-17.1 {OO: class introspection} -body { info class |