summaryrefslogtreecommitdiffstats
path: root/tests/button.test
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2004-12-07 10:07:39 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2004-12-07 10:07:39 (GMT)
commitb69436f63eb584b42aac5a7ff01b1521ae6b39ba (patch)
treeac46d3ef8f5e768028bf851e12e6860661df84b1 /tests/button.test
parent8546a169b649631672bb64dc2b4e25f8fbf32cb0 (diff)
downloadtk-b69436f63eb584b42aac5a7ff01b1521ae6b39ba.zip
tk-b69436f63eb584b42aac5a7ff01b1521ae6b39ba.tar.gz
tk-b69436f63eb584b42aac5a7ff01b1521ae6b39ba.tar.bz2
More duplicate testname elimination. [1078648]
Diffstat (limited to 'tests/button.test')
-rw-r--r--tests/button.test31
1 files changed, 19 insertions, 12 deletions
diff --git a/tests/button.test b/tests/button.test
index 49f117b..d3f93d8 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: button.test,v 1.18 2004/12/04 00:04:41 dkf Exp $
+# RCS: @(#) $Id: button.test,v 1.19 2004/12/07 10:07:41 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -112,27 +112,34 @@ foreach test {
} {
lassign $test name value okResult badValue badResult classes
foreach w {.l .b .c .r} hasOption $classes {
+ set classname [winfo class $w]
if {$hasOption} {
- test button-1.$i {configuration options} testImageType {
- $w configure $name $value
- lindex [$w configure $name] 4
- } $okResult
+ test button-1.$i "configuration option $name for $classname" \
+ -constraint testImageType -body "
+ $w configure $name [list $value]
+ lindex \[$w configure $name] 4
+ " -result $okResult
incr i
if {$badValue ne ""} {
- test button-1.$i {configuration options} testImageType {
- list [catch {$w configure $name $badValue} msg] $msg
- } [list 1 $badResult]
+ test button-1.$i "configuration option $name for $classname" \
+ -constraint testImageType \
+ -body [list $w configure $name $badValue] \
+ -returnCodes error -result $badResult
+ incr i
}
$w configure $name [lindex [$w configure $name] 3]
} else {
- test button-1.$i {configuration options} testImageType {
- list [catch {$w configure $name $value} msg] $msg
- } "1 {unknown option \"$name\"}"
+ test button-1.$i "configuration option $name for $classname" \
+ -constraint testImageType \
+ -body [list $w configure $name $value] \
+ -returnCodes error -result "unknown option \"$name\""
+ incr i
}
}
- incr i
}
test button-1.$i {configuration options} {
+ # Additional check to make sure that -selectcolor may be empty in
+ # checkbox widgets
.c configure -selectcolor {}
} {}