summaryrefslogtreecommitdiffstats
path: root/tests/oo.test
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-04-11 09:52:20 (GMT)
committersebres <sebres@users.sourceforge.net>2019-04-11 09:52:20 (GMT)
commit9f9c9efac0ac28445c688e275e02f54cd9a19574 (patch)
tree90e371cd6ca971c015fa3eef6b3cd06d2d59cc3d /tests/oo.test
parent869730bf85067c15e36cab14904da2bda45cb84a (diff)
parent417474f1fd64cb819d61f662390ad20a4ad66706 (diff)
downloadtcl-9f9c9efac0ac28445c688e275e02f54cd9a19574.zip
tcl-9f9c9efac0ac28445c688e275e02f54cd9a19574.tar.gz
tcl-9f9c9efac0ac28445c688e275e02f54cd9a19574.tar.bz2
merge 8.6 (conflicts resolved, changes on tests/cmdMZ.test in [4cb9044dfa] reverted - timerate is supported in 8.7)
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 0f8cd47..b0c5570 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -1549,6 +1549,30 @@ test oo-10.3 {OO: invoke and modify} -setup {
oo::define B deletemethod b c
lappend result [C a] [C b] [C c]
} -result {A.a,B.a A.b,B.b A.c,B.c - A.a,B.a A.b A.c,B.c - A.a A.b,B.a A.c,B.c - A.a A.b A.c}
+test oo-10.4 {OO: invoke and modify} -setup {
+ oo::class create A {
+ method a {} {return A.a}
+ method b {} {return A.b}
+ method c {} {return A.c}
+ }
+ A create B
+ oo::objdefine B {
+ method a {} {return [next],B.a}
+ method b {} {return [next],B.b}
+ method c {} {return [next],B.c}
+ }
+ set result {}
+} -cleanup {
+ A destroy
+} -body {
+ lappend result [B a] [B b] [B c] -
+ oo::objdefine B deletemethod b
+ lappend result [B a] [B b] [B c] -
+ oo::objdefine B renamemethod a b
+ lappend result [B a] [B b] [B c] -
+ oo::objdefine B deletemethod b c
+ lappend result [B a] [B b] [B c]
+} -result {A.a,B.a A.b,B.b A.c,B.c - A.a,B.a A.b A.c,B.c - A.a A.b,B.a A.c,B.c - A.a A.b A.c}
test oo-11.1 {OO: cleanup} {
oo::object create foo