diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2014-08-19 20:35:16 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2014-08-19 20:35:16 (GMT) |
commit | 22bb3f2bf92e4ea63f1c85a09e106235943b27eb (patch) | |
tree | fa7afec2d6205add53768a2c61fe601cd240d39c /tests | |
parent | f56a79a4ead94c1a0bb1338f91eff356d141124c (diff) | |
parent | 1c058969f08127a16e91339f83fc824493ac28cb (diff) | |
download | tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.zip tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.tar.gz tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.tar.bz2 |
merge trunktip_429
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oo.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test index fcd9818..8c515da 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -283,6 +283,23 @@ test oo-1.20 {basic test of OO functionality: my teardown post rename} -body { obj destroy info commands ::AGlobalName } -result {} +test oo-1.21 {basic test of OO functionality: default relations} -setup { + set fresh [interp create] +} -body { + lmap x [$fresh eval { + foreach cmd {instances subclasses mixins superclass} { + foreach initial {object class Slot} { + lappend x [info class $cmd ::oo::$initial] + } + } + foreach initial {object class Slot} { + lappend x [info object class ::oo::$initial] + } + return $x + }] {lsort $x} +} -cleanup { + interp delete $fresh +} -result {{} {::oo::Slot ::oo::class ::oo::object} {::oo::define::filter ::oo::define::mixin ::oo::define::superclass ::oo::define::variable ::oo::objdefine::filter ::oo::objdefine::mixin ::oo::objdefine::variable} {::oo::Slot ::oo::class} {} {} {} {} {} {} ::oo::object ::oo::object ::oo::class ::oo::class ::oo::class} test oo-2.1 {basic test of OO functionality: constructor} -setup { # This is a bit complex because it needs to run in a sub-interp as |