summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2005-05-10 22:26:16 (GMT)
committerdgp@users.sourceforge.net <dgp>2005-05-10 22:26:16 (GMT)
commit9cefcb8050650837e6f8be4a126833a396c6aa88 (patch)
tree6bf9541681dbdd8b157fa81062af4998fcaec847 /tests
parent81fd2ba719589cf7bdf8181a3f1342a50ac89182 (diff)
downloadtk-9cefcb8050650837e6f8be4a126833a396c6aa88.zip
tk-9cefcb8050650837e6f8be4a126833a396c6aa88.tar.gz
tk-9cefcb8050650837e6f8be4a126833a396c6aa88.tar.bz2
More improvements to test robustness; problems exposed by changes to
precision of doubles (TIP 132).
Diffstat (limited to 'tests')
-rw-r--r--tests/textDisp.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index ad73e5f..365dd8d 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.36 2005/05/10 21:36:37 dgp Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.37 2005/05/10 22:26:16 dgp Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -1630,7 +1630,7 @@ test textDisp-14.7 {TkTextXviewCmd procedure} {
.t insert end "xxxx xxxxxxxxx xxxxxxxxxxxxx"
.t xview moveto .3
.t xview
-} {0.301020408163 0.658163265306}
+} [list [expr {118.0/392}] [expr {258.0/392}]]
test textDisp-14.8 {TkTextXviewCmd procedure} {
.t delete 1.0 end
.t insert end xxxxxxxxx\n
@@ -1977,14 +1977,14 @@ test textDisp-16.34 {TkTextYviewCmd procedure} {
test textDisp-16.35 {TkTextYviewCmd procedure} {
set res {}
.t yview 1.0
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [expr {round([lindex [.t yview] 0] * [.t count -ypixels 1.0 end])}]
.t yview scroll 13 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [expr {round([lindex [.t yview] 0] * [.t count -ypixels 1.0 end])}]
.t yview scroll -4 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [expr {round([lindex [.t yview] 0] * [.t count -ypixels 1.0 end])}]
.t yview scroll -9 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
-} {0.0 13.0 9.0 0.0}
+ lappend res [expr {round([lindex [.t yview] 0] * [.t count -ypixels 1.0 end])}]
+} {0 13 9 0}
test textDisp-16.36 {TkTextYviewCmd procedure} {
set res {}
.t yview 1.0