diff options
author | dgp@users.sourceforge.net <dgp> | 2006-03-14 06:04:46 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2006-03-14 06:04:46 (GMT) |
commit | 7880128776f93d26daad59ccd2dcd79d6b2b17cd (patch) | |
tree | 433cc71db0bd1066895f9cbc7879152d1a7217b9 /tests | |
parent | 97f2db06f53f76c2c533babcf9cfb687e103612e (diff) | |
download | tk-7880128776f93d26daad59ccd2dcd79d6b2b17cd.zip tk-7880128776f93d26daad59ccd2dcd79d6b2b17cd.tar.gz tk-7880128776f93d26daad59ccd2dcd79d6b2b17cd.tar.bz2 |
* tests/scrollbar.test: Corrected several broken calls to [testmetrics]
that were crashing the test suite.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scrollbar.test | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 013ce36..84a5bf7 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scrollbar.test,v 1.16 2005/12/01 02:02:20 hobbs Exp $ +# RCS: @(#) $Id: scrollbar.test,v 1.17 2006/03/14 06:04:46 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -21,9 +21,9 @@ proc scroll args { proc getTroughSize {w} { if {[testConstraint testmetrics]} { if [string match v* [$w cget -orient]] { - return [expr [winfo height $w] - 2*[testmetrics cyvscroll]] + return [expr [winfo height $w] - 2*[testmetrics cyvscroll $w]] } else { - return [expr [winfo width $w] - 2*[testmetrics cxhscroll]] + return [expr [winfo width $w] - 2*[testmetrics cxhscroll $w]] } } else { if [string match v* [$w cget -orient]] { @@ -276,7 +276,7 @@ test scrollbar-3.41 {ScrollbarWidgetCmd procedure, "fraction" option} { .t.s fraction 100 0 } {0.5} if {[testConstraint testmetrics]} { - place configure .t.s -width [expr 2*[testmetrics cxhscroll]+1] + place configure .t.s -width [expr 2*[testmetrics cxhscroll .t.s]+1] } else { place configure .t.s -width [expr [winfo reqwidth .t.s] - 4] } @@ -460,7 +460,7 @@ test scrollbar-6.14 {ScrollbarPosition procedure} win { .s identify [expr [winfo width .s] / 2] 0 } {arrow1} test scrollbar-6.15 {ScrollbarPosition procedure} {testmetrics win} { - .s identify [expr [winfo width .s] / 2] [expr [testmetrics cyvscroll] - 1] + .s identify [expr [winfo width .s] / 2] [expr [testmetrics cyvscroll .s] - 1] } {arrow1} test scrollbar-6.16 {ScrollbarPosition procedure} unix { .s identify 8 20 @@ -471,11 +471,11 @@ test scrollbar-6.17 {ScrollbarPosition procedure} {unix nonPortable} { .s identify 8 51 } {trough1} test scrollbar-6.18 {ScrollbarPosition procedure} {testmetrics win} { - .s identify [expr [winfo width .s] / 2] [testmetrics cyvscroll] + .s identify [expr [winfo width .s] / 2] [testmetrics cyvscroll .s] } {trough1} test scrollbar-6.19 {ScrollbarPosition procedure} {testmetrics win} { .s identify [expr [winfo width .s] / 2] [expr int(.2 / [.s delta 0 1]) \ - + [testmetrics cyvscroll] - 1] + + [testmetrics cyvscroll .s] - 1] } {trough1} test scrollbar-6.20 {ScrollbarPosition procedure} unix { .s identify 8 52 @@ -487,11 +487,11 @@ test scrollbar-6.21 {ScrollbarPosition procedure} {unix nonPortable} { } {slider} test scrollbar-6.22 {ScrollbarPosition procedure} {testmetrics win} { .s identify [expr [winfo width .s] / 2] \ - [expr int(.2 / [.s delta 0 1] + 0.5) + [testmetrics cyvscroll]] + [expr int(.2 / [.s delta 0 1] + 0.5) + [testmetrics cyvscroll .s]] } {slider} test scrollbar-6.23 {ScrollbarPosition procedure} {testmetrics win} { .s identify [expr [winfo width .s] / 2] [expr int(.4 / [.s delta 0 1]) \ - + [testmetrics cyvscroll] - 1] + + [testmetrics cyvscroll .s] - 1] } {slider} test scrollbar-6.24 {ScrollbarPosition procedure} unix { .s identify 8 84 @@ -505,11 +505,11 @@ test scrollbar-6.27 {ScrollbarPosition procedure} {testmetrics win knownBug} { # that is larger than the thumb displayed, skewing the ability to # calculate the trough2 area correctly (Win2k). -- hobbs .s identify [expr [winfo width .s] / 2] [expr int(.4 / [.s delta 0 1]) \ - + [testmetrics cyvscroll]] + + [testmetrics cyvscroll .s]] } {trough2} test scrollbar-6.28 {ScrollbarPosition procedure} {testmetrics win} { .s identify [expr [winfo width .s] / 2] [expr [winfo height .s] \ - - [testmetrics cyvscroll] - 1] + - [testmetrics cyvscroll .s] - 1] } {trough2} test scrollbar-6.29 {ScrollbarPosition procedure} unix { .s identify 8 180 @@ -519,7 +519,7 @@ test scrollbar-6.30 {ScrollbarPosition procedure} unix { } {arrow2} test scrollbar-6.32 {ScrollbarPosition procedure} {testmetrics win} { .s identify [expr [winfo width .s] / 2] [expr [winfo height .s] \ - - [testmetrics cyvscroll]] + - [testmetrics cyvscroll .s]] } {arrow2} test scrollbar-6.33 {ScrollbarPosition procedure} win { .s identify [expr [winfo width .s] / 2] [expr [winfo height .s] - 1] @@ -555,7 +555,7 @@ test scrollbar-6.41 {ScrollbarPosition procedure} unix { .t.s identify 82 8 } {slider} test scrollbar-6.43 {ScrollbarPosition procedure} {testmetrics win} { - .t.s identify [expr int(.4 / [.t.s delta 1 0]) + [testmetrics cxhscroll] \ + .t.s identify [expr int(.4 / [.t.s delta 1 0]) + [testmetrics cxhscroll .t.s] \ - 1] [expr [winfo height .t.s] / 2] } {slider} test scrollbar-6.44 {ScrollbarPosition procedure} unix { |