summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2015-07-10 12:41:57 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2015-07-10 12:41:57 (GMT)
commit54973b1d25bb129ab2ef8b3b0082175e5f8eeb89 (patch)
tree22e7ad7a029d92c4e8f27042fe06fb44600e1817 /tests
parente31d1c7be0321e55f6e4982415df1aba08e0febf (diff)
parentf4fd861a23e2867e38607aad65b39d2ed61f10c1 (diff)
downloadtcl-54973b1d25bb129ab2ef8b3b0082175e5f8eeb89.zip
tcl-54973b1d25bb129ab2ef8b3b0082175e5f8eeb89.tar.gz
tcl-54973b1d25bb129ab2ef8b3b0082175e5f8eeb89.tar.bz2
Implement TIP 436: Improve TclOO isa Introspection
Diffstat (limited to 'tests')
-rw-r--r--tests/oo.test24
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