summaryrefslogtreecommitdiffstats
path: root/tests/oo.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-10 13:04:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-10 13:04:09 (GMT)
commitb819f831ae7faeea840b095764fee75fbf712894 (patch)
tree215424b1f00d87893e1a29661c0fea343087cb05 /tests/oo.test
parent5228c17959dbe7ad564041300de50f178267e99c (diff)
downloadtcl-b819f831ae7faeea840b095764fee75fbf712894.zip
tcl-b819f831ae7faeea840b095764fee75fbf712894.tar.gz
tcl-b819f831ae7faeea840b095764fee75fbf712894.tar.bz2
Fix [Bug 2155658]
Diffstat (limited to 'tests/oo.test')
-rw-r--r--tests/oo.test24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test
index 7d328f6..2df1d4d 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -7,7 +7,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: oo.test,v 1.14 2008/09/26 20:16:39 dgp Exp $
+# RCS: @(#) $Id: oo.test,v 1.15 2008/10/10 13:04:09 dkf Exp $
package require TclOO 0.4 ;# Must match value in configure.in
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -316,6 +316,28 @@ test oo-4.4 {exporting a class method from an object} -setup {
oo::objdefine testObject export Good
testObject Good
} -result ok
+test oo-4.5 {export creates proper method entries} -setup {
+ oo::class create testClass
+} -body {
+ oo::define testClass {
+ export foo
+ method foo {} {return ok}
+ }
+ [testClass new] foo
+} -cleanup {
+ testClass destroy
+} -result ok
+test oo-4.6 {export creates proper method entries} -setup {
+ oo::class create testClass
+} -body {
+ oo::define testClass {
+ unexport foo
+ method foo {} {return ok}
+ }
+ [testClass new] foo
+} -cleanup {
+ testClass destroy
+} -result ok
test oo-5.1 {OO: manipulation of classes as objects} -setup {
set obj [oo::object new]