summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/link.test2
-rw-r--r--tests/oo.test37
2 files changed, 38 insertions, 1 deletions
diff --git a/tests/link.test b/tests/link.test
index dda7d6b..6bff356 100644
--- a/tests/link.test
+++ b/tests/link.test
@@ -152,7 +152,7 @@ test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup {
set uwide "0O"
concat [testlink get] | $int $real $bool $string $wide $char $uchar $short $ushort $uint $long $ulong $float $uwide
} -result {0 0.0 0 0 0 0 0 0 0 0 0 0 0.0 0 | 0x 0b 0 0 0O 0X 0B 0O 0x 0b 0o 0X 0B 0O}
-test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup {
+test link-2.9 {writing C variables from Tcl} -constraints {testlink} -setup {
testlink delete
} -body {
testlink set 43 1.21 4 - 56785678 64 250 30000 60000 0xbaadbeef 12321 32123 3.25 1231231234
diff --git a/tests/oo.test b/tests/oo.test
index 2601c37..cb37a76 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -2241,6 +2241,43 @@ test oo-17.10 {OO: class introspection} -setup {
oo::define foo unexport {*}[info class methods foo -all]
info class methods foo -all
} -result {}
+set stdmethods {<cloned> destroy eval unknown variable varname}
+test oo-17.11 {OO: object method unexport (bug 900cb0284bc)} -setup {
+ oo::object create o
+ oo::objdefine o unexport m
+} -body {
+ lsort [info object methods o -all -private]
+} -cleanup {
+ o destroy
+} -result $stdmethods
+test oo-17.12 {OO: instance method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ c create o
+ oo::objdefine o unexport m
+} -body {
+ lsort [info object methods o -all -private]
+} -cleanup {
+ o destroy
+ c destroy
+} -result $stdmethods
+test oo-17.13 {OO: class method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ oo::define c unexport m
+} -body {
+ lsort [info class methods c -all -private]
+} -cleanup {
+ c destroy
+} -result $stdmethods
+test oo-17.14 {OO: instance method unexport (bug 900cb0284bc)} -setup {
+ oo::class create c
+ oo::define c unexport m
+ c create o
+} -body {
+ lsort [info object methods o -all -private]
+} -cleanup {
+ o destroy
+ c destroy
+} -result $stdmethods
test oo-18.1 {OO: define command support} {
list [catch {oo::define oo::object {error foo}} msg] $msg $errorInfo