summaryrefslogtreecommitdiffstats
path: root/tests/spinbox.test
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-10-06 23:42:58 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-10-06 23:42:58 (GMT)
commite0b0b949f2dd493f17925e7318a7e4f9854fae27 (patch)
tree346d568a650994ebd3164cbb0d1c1b4ccd9bff9b /tests/spinbox.test
parent9179ac5d7ee1093c15e0cdf76142cc7eb1a10bf4 (diff)
downloadtk-e0b0b949f2dd493f17925e7318a7e4f9854fae27.zip
tk-e0b0b949f2dd493f17925e7318a7e4f9854fae27.tar.gz
tk-e0b0b949f2dd493f17925e7318a7e4f9854fae27.tar.bz2
Removed dependency on default precision
Diffstat (limited to 'tests/spinbox.test')
-rw-r--r--tests/spinbox.test68
1 files changed, 34 insertions, 34 deletions
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 5393c4f..2f7d411 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: spinbox.test,v 1.11 2008/07/23 23:24:25 nijtmans Exp $
+# RCS: @(#) $Id: spinbox.test,v 1.12 2008/10/06 23:42:58 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -1708,10 +1708,10 @@ test spinbox-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview 5
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0.0537634 0.268817}
+} -result {0.053763 0.268817}
test spinbox-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -1731,7 +1731,7 @@ test spinbox-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview 0
.e icursor 10
.e xview insert
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.107527 0.322581}
@@ -1761,10 +1761,10 @@ test spinbox-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e insert end "This is quite a long text string, so long that it "
.e insert end "runs off the end of the window quite a bit."
.e xview moveto 0.5
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0.505376 0.72043}
+} -result {0.505376 0.720430}
test spinbox-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
pack .e
@@ -1796,7 +1796,7 @@ test spinbox-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup {
update
.e xview moveto 0
.e xview scroll 1 pages
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.193548 0.408602}
@@ -1810,7 +1810,7 @@ test spinbox-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup {
.e xview moveto .9
update
.e xview scroll -2 p
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
} -result {0.397849 0.612903}
@@ -1903,14 +1903,14 @@ test spinbox-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup {
# 0.106383 0.117021 0.117021
set x {}
.e xview moveto .1
- lappend x [lindex [.e xview] 0]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
.e xview moveto .11
- lappend x [lindex [.e xview] 0]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
.e xview moveto .12
- lappend x [lindex [.e xview] 0]
+ lappend x [format {%.6f} [lindex [.e xview] 0]]
} -cleanup {
destroy .e
-} -result {0.0957447 0.106383 0.117021}
+} -result {0.095745 0.106383 0.117021}
test spinbox-3.87 {EntryWidgetCmd procedure} -setup {
spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2
@@ -2017,10 +2017,10 @@ test spinbox-4.7 {ConfigureEntry procedure} -setup {
.e insert end "01234567890"
update
.e configure -width 5
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0 0.363636}
+} -result {0.000000 0.363636}
test spinbox-4.8 {ConfigureEntry procedure} -constraints {
fonts
@@ -2206,10 +2206,10 @@ test spinbox-6.1 {InsertChars procedure} -setup {
.e insert 0 abcde
.e insert 2 XXX
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abXXXcde abXXXcde {0 1}}
+} -result {abXXXcde abXXXcde {0.000000 1.000000}}
test spinbox-6.2 {InsertChars procedure} -setup {
unset -nocomplain contents
@@ -2221,10 +2221,10 @@ test spinbox-6.2 {InsertChars procedure} -setup {
.e insert 0 abcde
.e insert 500 XXX
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abcdeXXX abcdeXXX {0 1}}
+} -result {abcdeXXX abcdeXXX {0.000000 1.000000}}
test spinbox-6.3 {InsertChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
@@ -2353,10 +2353,10 @@ test spinbox-7.1 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete 2 4
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abe abe {0 1}}
+} -result {abe abe {0.000000 1.000000}}
test spinbox-7.2 {DeleteChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2367,10 +2367,10 @@ test spinbox-7.2 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete -2 2
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {cde cde {0 1}}
+} -result {cde cde {0.000000 1.000000}}
test spinbox-7.3 {DeleteChars procedure} -setup {
unset -nocomplain contents
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
@@ -2381,10 +2381,10 @@ test spinbox-7.3 {DeleteChars procedure} -setup {
.e insert 0 abcde
.e delete 3 1000
update
- list [.e get] $contents $scrollInfo
+ list [.e get] $contents [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {abc abc {0 1}}
+} -result {abc abc {0.000000 1.000000}}
test spinbox-7.4 {DeleteChars procedure} -setup {
spinbox .e -width 10 -font {Courier -12} -highlightthickness 2 -bd 2
pack .e
@@ -3144,16 +3144,16 @@ test spinbox-15.1 {EntryVisibleRange procedure} -constraints fonts -body {
pack .e
update
.e insert 0 "............................."
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0 0.827586}
+} -result {0.000000 0.827586}
test spinbox-16.2 {EntryVisibleRange procedure} -body {
spinbox .e
- .e xview
+ format {%.6f %.6f} {*}[.e xview]
} -cleanup {
destroy .e
-} -result {0 1}
+} -result {0.000000 1.000000}
test spinbox-16.1 {EntryUpdateScrollbar procedure} -body {
@@ -3162,27 +3162,27 @@ test spinbox-16.1 {EntryUpdateScrollbar procedure} -body {
.e delete 0 end
.e insert 0 123
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0 1}
+} -result {0.000000 1.000000}
test spinbox-16.2 {EntryUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 0123456789abcdef
.e xview 3
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
-} -result {0.1875 0.8125}
+} -result {0.187500 0.812500}
test spinbox-16.3 {EntryUpdateScrollbar procedure} -body {
spinbox .e -width 10 -xscrollcommand scroll -font {Courier -12}
pack .e
.e insert 0 abcdefghijklmnopqrs
.e xview 6
update
- return $scrollInfo
+ return [format {%.6f %.6f} {*}$scrollInfo]
} -cleanup {
destroy .e
} -result {0.315789 0.842105}
@@ -3201,7 +3201,7 @@ test spinbox-16.4 {EntryUpdateScrollbar procedure} -setup {
rename bgerror {}
} -result {{invalid command name "thisisnotacommand"} {invalid command name "thisisnotacommand"
while executing
-"thisisnotacommand 0 1"
+"thisisnotacommand 0.0 1.0"
(horizontal scrolling command executed by .e)}}