summaryrefslogtreecommitdiffstats
path: root/tests/oo.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2015-07-10 12:40:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2015-07-10 12:40:49 (GMT)
commitf4fd861a23e2867e38607aad65b39d2ed61f10c1 (patch)
tree8cafc5cc6a6c4070db7e22a2342f90710e6f74d3 /tests/oo.test
parentd73743625ca06bbbd8c8b013a31a9ffffce40bd1 (diff)
downloadtcl-f4fd861a23e2867e38607aad65b39d2ed61f10c1.zip
tcl-f4fd861a23e2867e38607aad65b39d2ed61f10c1.tar.gz
tcl-f4fd861a23e2867e38607aad65b39d2ed61f10c1.tar.bz2
Added tests.tip_436
Diffstat (limited to 'tests/oo.test')
-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