diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-09 09:11:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-04-09 09:11:31 (GMT) |
commit | d96dda52c403f620a9fd1ae77fe07e1505d0efe2 (patch) | |
tree | fa20e91a771b26d82026ec0a23f9f19eb12af413 /tests | |
parent | e4912abbd2b65403ba09d78d791e107e2d70fdba (diff) | |
download | tcl-d96dda52c403f620a9fd1ae77fe07e1505d0efe2.zip tcl-d96dda52c403f620a9fd1ae77fe07e1505d0efe2.tar.gz tcl-d96dda52c403f620a9fd1ae77fe07e1505d0efe2.tar.bz2 |
Added missing test case
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 db5c14f..b0704da 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -1480,6 +1480,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 |