summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-05-10 22:26:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-05-10 22:26:16 (GMT)
commit67362ad60cc6f5f65b85ec858303b870181c041d (patch)
tree6bf9541681dbdd8b157fa81062af4998fcaec847 /tests/textDisp.test
parent88d2561621f99dad2a7f8bf122dac2c1d837ed25 (diff)
downloadtk-67362ad60cc6f5f65b85ec858303b870181c041d.zip
tk-67362ad60cc6f5f65b85ec858303b870181c041d.tar.gz
tk-67362ad60cc6f5f65b85ec858303b870181c041d.tar.bz2
More improvements to test robustness; problems exposed by changes to
precision of doubles (TIP 132).
Diffstat (limited to 'tests/textDisp.test')
-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