summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-12-01 00:03:03 (GMT)
committerhobbs <hobbs>2005-12-01 00:03:03 (GMT)
commitafe0e4e6149faf8d8a21af3aa30ed226e74a66bd (patch)
treec1a1ca11f12ba641c2b77378fffbb5c7b60c716e
parent43b49263860d030f6b69b3238fb77b01ba284cc8 (diff)
downloadtk-afe0e4e6149faf8d8a21af3aa30ed226e74a66bd.zip
tk-afe0e4e6149faf8d8a21af3aa30ed226e74a66bd.tar.gz
tk-afe0e4e6149faf8d8a21af3aa30ed226e74a66bd.tar.bz2
* tests/scrollbar.test (6.22): fix rounding-error sensitive test
-rw-r--r--ChangeLog2
-rw-r--r--tests/scrollbar.test6
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d94df83..b3e6220 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2005-11-30 Jeff Hobbs <jeffh@ActiveState.com>
+ * tests/scrollbar.test (6.22): fix rounding-error sensitive test
+
* tests/textWind.test: use "Courier -12" on all platforms.
Reduces Windows XP test errors in that file from 9 to 2 (13.2 and
13.9 still off-by-one pixel).
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 025df53..0be5e04 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.9 2002/07/13 20:28:35 dgp Exp $
+# RCS: @(#) $Id: scrollbar.test,v 1.9.2.1 2005/12/01 00:03:04 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -510,8 +510,8 @@ test scrollbar-6.21 {ScrollbarPosition procedure} {macOrUnix nonPortable} {
.s identify 8 83
} {slider}
test scrollbar-6.22 {ScrollbarPosition procedure} {testmetrics pcOnly} {
- .s identify [expr [winfo width .s] / 2] [expr int(.2 / [.s delta 0 1]) \
- + [testmetrics cyvscroll]]
+ .s identify [expr [winfo width .s] / 2] \
+ [expr int(.2 / [.s delta 0 1] + 0.5) + [testmetrics cyvscroll]]
} {slider}
test scrollbar-6.23 {ScrollbarPosition procedure} {testmetrics pcOnly} {
.s identify [expr [winfo width .s] / 2] [expr int(.4 / [.s delta 0 1]) \