summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-10-08 20:15:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-10-08 20:15:26 (GMT)
commitfc8311ca1ea7910975b3ecc853f51c687fe1aec7 (patch)
tree748e3f3ca03019cb436216c9bf16a275ca76da0a
parent8480959cd7ddd7a269abe2285e84d84b2f48d64d (diff)
downloadtk-fc8311ca1ea7910975b3ecc853f51c687fe1aec7.zip
tk-fc8311ca1ea7910975b3ecc853f51c687fe1aec7.tar.gz
tk-fc8311ca1ea7910975b3ecc853f51c687fe1aec7.tar.bz2
* tests/textDisp.test (textDisp-16.34): Update test that tested
string equality of double values based on an assumption of tcl_precision==12. Test now does its own formatting.
-rw-r--r--ChangeLog4
-rw-r--r--tests/textDisp.test22
2 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b63e9c..cc19365 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2008-10-08 Don Porter <dgp@users.sourceforge.net>
+ * tests/textDisp.test (textDisp-16.34): Update test that tested
+ string equality of double values based on an assumption of
+ tcl_precision==12. Test now does its own formatting.
+
* tests/scrollbar.test: Revised testing of the cget subcommand so
that it tests consistency with the configure subcommand and not
agreement with a hardcoded value that will change as tastes in
diff --git a/tests/textDisp.test b/tests/textDisp.test
index c8594e2..6d3212c 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.42 2007/12/13 15:27:54 dgp Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.43 2008/10/08 20:15:26 dgp Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -1962,18 +1962,24 @@ test textDisp-16.33 {TkTextYviewCmd procedure} {
test textDisp-16.34 {TkTextYviewCmd procedure} {
set res {}
.t yview 1.0
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
.t yview scroll 1 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
.t yview scroll 1 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
.t yview scroll 1 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
.t yview scroll 1 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
.t yview scroll 1 pixels
- lappend res [expr {[lindex [.t yview] 0] * [.t count -ypixels 1.0 end]}]
-} {0.0 1.0 2.0 3.0 4.0 5.0}
+ lappend res [format %.12g [expr {[lindex [.t yview] 0]
+ * [.t count -ypixels 1.0 end]}]]
+} {0 1 2 3 4 5}
test textDisp-16.35 {TkTextYviewCmd procedure} {
set res {}
.t yview 1.0