summaryrefslogtreecommitdiffstats
path: root/tests/oo.test
diff options
context:
space:
mode:
authoraspect <aspect+tclcore@abstracted-spleen.org>2017-03-27 13:02:22 (GMT)
committeraspect <aspect+tclcore@abstracted-spleen.org>2017-03-27 13:02:22 (GMT)
commite18d7f592196530ea7602ea21a0a5341f08f960c (patch)
treef220dd7bcc08724b00fb9400fcb1df73b3b50bdc /tests/oo.test
parente30a832a0e2040dd682f2e77c6d26043e0829d80 (diff)
downloadtcl-e18d7f592196530ea7602ea21a0a5341f08f960c.zip
tcl-e18d7f592196530ea7602ea21a0a5341f08f960c.tar.gz
tcl-e18d7f592196530ea7602ea21a0a5341f08f960c.tar.bz2
Correct this use of isWanted to ensure NO_IMPLEMENTATION methods are not listed (bug [900cb0284bc])
Diffstat (limited to 'tests/oo.test')
-rw-r--r--tests/oo.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test
index ccb05c1..290e41d 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -2242,6 +2242,44 @@ test oo-17.10 {OO: class introspection} -setup {
info class methods foo -all
} -result {}
+test oo-17.11 {OO: object method unexport (bug 900cb0284bc)} -setup {
+ oo::object create o
+ oo::objdefine o unexport m
+} -cleanup {
+ o destroy
+} -body {
+ expr {"m" in [info object methods o -all -private]}
+} -result 0
+test oo-17.12 {OO: instance method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ c create o
+ oo::objdefine o unexport m
+} -cleanup {
+ o destroy
+ c destroy
+} -body {
+ expr {"m" in [info object methods o -all -private]}
+} -result 0
+test oo-17.13 {OO: class method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ oo::define c unexport m
+} -cleanup {
+ c destroy
+} -body {
+ expr {"m" in [info class methods c -all -private]}
+} -result 0
+test oo-17.14 {OO: instance method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ oo::define c unexport m
+ c create o
+} -cleanup {
+ o destroy
+ c destroy
+} -body {
+ expr {"m" in [info object methods o -all -private]}
+} -result 0
+
+
test oo-18.1 {OO: define command support} {
list [catch {oo::define oo::object {error foo}} msg] $msg $errorInfo
} {1 foo {foo