diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-13 09:01:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-13 09:01:44 (GMT) |
commit | 593c09234c072649be17dd4b5cb98fe20ebdbe73 (patch) | |
tree | 03ea4c207ef42fd63e9f8c7f01e1c832a46d1174 /tests | |
parent | 7e3e434235a27d0e8b697f2731cd42d8536ca349 (diff) | |
parent | 444cb185b8fba2c875480e0f04ffb7340f5dbcb3 (diff) | |
download | tcl-593c09234c072649be17dd4b5cb98fe20ebdbe73.zip tcl-593c09234c072649be17dd4b5cb98fe20ebdbe73.tar.gz tcl-593c09234c072649be17dd4b5cb98fe20ebdbe73.tar.bz2 |
merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oo.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test index f35b70a..c83e015 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -2077,6 +2077,30 @@ test oo-16.13 {OO: object introspection} -setup { oo::objdefine foo method Bar {} {return "ok in foo"} [info object namespace foo]::my Bar } -result "ok in foo" +test oo-16.14 {OO: object introspection: TIP #436} -setup { + oo::class create meta { superclass oo::class } + [meta create instance1] create instance2 +} -body { + list class [list [info object isa class NOTANOBJECT] \ + [info object isa class list]] \ + meta [list [info object isa metaclass NOTANOBJECT] \ + [info object isa metaclass list] \ + [info object isa metaclass oo::object]] \ + type [list [info object isa typeof oo::object NOTANOBJECT] \ + [info object isa typeof NOTANOBJECT oo::object] \ + [info object isa typeof list NOTANOBJECT] \ + [info object isa typeof NOTANOBJECT list] \ + [info object isa typeof oo::object list] \ + [info object isa typeof list oo::object]] \ + mix [list [info object isa mixin oo::object NOTANOBJECT] \ + [info object isa mixin NOTANOBJECT oo::object] \ + [info object isa mixin list NOTANOBJECT] \ + [info object isa mixin NOTANOBJECT list] \ + [info object isa mixin oo::object list] \ + [info object isa mixin list oo::object]] +} -cleanup { + meta destroy +} -result {class {0 0} meta {0 0 0} type {0 0 0 0 0 0} mix {0 0 0 0 0 0}} test oo-17.1 {OO: class introspection} -body { info class |