summaryrefslogtreecommitdiffstats
path: root/tests/scale.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scale.test')
-rw-r--r--tests/scale.test68
1 files changed, 34 insertions, 34 deletions
diff --git a/tests/scale.test b/tests/scale.test
index 955092b..055762f 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -1,9 +1,9 @@
# This file is a Tcl script to test out the "scale" command
# of Tk. It is organized in the standard fashion for Tcl tests.
#
-# Copyright (c) 1994 The Regents of the University of California.
-# Copyright (c) 1994-1996 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
+# Copyright © 1994 The Regents of the University of California.
+# Copyright © 1994-1996 Sun Microsystems, Inc.
+# Copyright © 1998-1999 by Scriptics Corporation.
# All rights reserved.
package require tcltest 2.2
@@ -46,7 +46,7 @@ test scale-1.5 {configuration options} -body {
.s cget -bd
} -cleanup {
.s configure -bd [lindex [.s configure -bd] 3]
-} -result {4}
+} -result 4
test scale-1.6 {configuration options} -body {
.s configure -bd badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -73,7 +73,7 @@ test scale-1.11 {configuration options} -body {
.s cget -borderwidth
} -cleanup {
.s configure -borderwidth [lindex [.s configure -borderwidth] 3]
-} -result {1}
+} -result 1
test scale-1.12 {configuration options} -body {
.s configure -borderwidth badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -97,7 +97,7 @@ test scale-1.17 {configuration options} -body {
.s cget -digits
} -cleanup {
.s configure -digits [lindex [.s configure -digits] 3]
-} -result {5}
+} -result 5
test scale-1.18 {configuration options} -body {
.s configure -digits badValue
} -returnCodes error -result {expected integer but got "badValue"}
@@ -157,7 +157,7 @@ test scale-1.31 {configuration options} -body {
.s cget -highlightthickness
} -cleanup {
.s configure -highlightthickness [lindex [.s configure -highlightthickness] 3]
-} -result {2}
+} -result 2
test scale-1.32 {configuration options} -body {
.s configure -highlightthickness badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -172,7 +172,7 @@ test scale-1.35 {configuration options} -body {
.s cget -length
} -cleanup {
.s configure -length [lindex [.s configure -length] 3]
-} -result {130}
+} -result 130
test scale-1.36 {configuration options} -body {
.s configure -length badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -205,7 +205,7 @@ test scale-1.43 {configuration options} -body {
.s cget -repeatdelay
} -cleanup {
.s configure -repeatdelay [lindex [.s configure -repeatdelay] 3]
-} -result {14}
+} -result 14
test scale-1.44 {configuration options} -body {
.s configure -repeatdelay bogus
} -returnCodes error -result {expected integer but got "bogus"}
@@ -214,7 +214,7 @@ test scale-1.45 {configuration options} -body {
.s cget -repeatinterval
} -cleanup {
.s configure -repeatinterval [lindex [.s configure -repeatinterval] 3]
-} -result {14}
+} -result 14
test scale-1.46 {configuration options} -body {
.s configure -repeatinterval bogus
} -returnCodes error -result {expected integer but got "bogus"}
@@ -232,7 +232,7 @@ test scale-1.49 {configuration options} -body {
.s cget -showvalue
} -cleanup {
.s configure -showvalue [lindex [.s configure -showvalue] 3]
-} -result {0}
+} -result 0
test scale-1.50 {configuration options} -body {
.s configure -showvalue badValue
} -returnCodes error -result {expected boolean value but got "badValue"}
@@ -241,7 +241,7 @@ test scale-1.51 {configuration options} -body {
.s cget -sliderlength
} -cleanup {
.s configure -sliderlength [lindex [.s configure -sliderlength] 3]
-} -result {86}
+} -result 86
test scale-1.52 {configuration options} -body {
.s configure -sliderlength badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -313,7 +313,7 @@ test scale-1.69 {configuration options} -body {
.s cget -width
} -cleanup {
.s configure -width [lindex [.s configure -width] 3]
-} -result {32}
+} -result 32
test scale-1.70 {configuration options} -body {
.s configure -width badValue
} -returnCodes error -result {bad screen distance "badValue"}
@@ -359,7 +359,7 @@ test scale-3.4 {ScaleWidgetCmd procedure, cget option} -body {
test scale-3.5 {ScaleWidgetCmd procedure, cget option} -body {
.s configure -highlightthickness 2
.s cget -highlightthickness
-} -result {2}
+} -result 2
test scale-3.6 {ScaleWidgetCmd procedure, configure option} -body {
list [llength [.s configure]] [lindex [.s configure] 6]
} -result {33 {-command command Command {} {}}}
@@ -466,7 +466,7 @@ test scale-3.28 {ScaleWidgetCmd procedure, set option} -body {
.s set 181
.s configure -state normal
.s get
-} -result {118}
+} -result 118
test scale-3.29 {ScaleWidgetCmd procedure} -body {
.s dumb
} -returnCodes error -result {bad option "dumb": must be cget, configure, coords, get, identify, or set}
@@ -588,27 +588,27 @@ test scale-6.1 {ComputeFormat procedure} -body {
.s configure -from 10 -to 100 -resolution 10
.s set 49.3
.s get
-} -result {50}
+} -result 50
test scale-6.2 {ComputeFormat procedure} -body {
.s configure -from 100 -to 1000 -resolution 100
.s set 493
.s get
-} -result {500}
+} -result 500
test scale-6.3 {ComputeFormat procedure} -body {
.s configure -from 1000 -to 10000 -resolution 1000
.s set 4930
.s get
-} -result {5000}
+} -result 5000
test scale-6.4 {ComputeFormat procedure} -body {
.s configure -from 10000 -to 100000 -resolution 10000
.s set 49000
.s get
-} -result {50000}
+} -result 50000
test scale-6.5 {ComputeFormat procedure} -body {
.s configure -from 100000 -to 1000000 -resolution 100000
.s set 493000
.s get
-} -result {500000}
+} -result 500000
test scale-6.6 {ComputeFormat procedure} -constraints {
nonPortable
} -body {
@@ -617,7 +617,7 @@ test scale-6.6 {ComputeFormat procedure} -constraints {
.s configure -from 1000000 -to 10000000 -resolution 1000000
.s set 4930000
.s get
-} -result {5000000}
+} -result 5000000
test scale-6.7 {ComputeFormat procedure} -body {
.s configure -from 1000000000 -to 10000000000 -resolution 1000000000
.s set 4930000000
@@ -652,7 +652,7 @@ test scale-6.13 {ComputeFormat procedure} -body {
.s configure -from .000001 -to .00001 -resolution .000001
.s set .000006
expr {[.s get] == 6.0e-06}
-} -result {1}
+} -result 1
test scale-6.14 {ComputeFormat procedure} -body {
.s configure -to .00001 -from .0001 -resolution .00001
.s set .00006
@@ -662,17 +662,17 @@ test scale-6.15 {ComputeFormat procedure} -body {
.s configure -to .000001 -from .00001 -resolution .000001
.s set .000006
expr {[.s get] == 6.0e-06}
-} -result {1}
+} -result 1
test scale-6.16 {ComputeFormat procedure} -body {
.s configure -from .00001 -to .0001 -resolution .00001 -digits 1
.s set .00006
expr {[.s get] == 6e-05}
-} -result {1}
+} -result 1
test scale-6.17 {ComputeFormat procedure} -body {
.s configure -from 10000000 -to 100000000 -resolution 10000000 -digits 3
.s set 49300000
.s get
-} -result {50000000}
+} -result 50000000
test scale-6.18 {ComputeFormat procedure} -body {
.s configure -length 200 -from 0 -to 10 -resolution 0 -digits 0
.s set .111111111
@@ -1135,26 +1135,26 @@ test scale-14.5 {RoundValueToResolution procedure} -body {
-orient horizontal -resolution 4.0
update
.s get 84 152
-} -result {-28}
+} -result -28
test scale-14.6 {RoundValueToResolution procedure} -body {
.s configure -from -100 -to 0 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 86 152
-} -result {-24}
+} -result -24
test scale-14.7 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 84 152
-} -result {-72}
+} -result -72
test scale-14.8 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to -100 -sliderlength 10 -length 114 -bd 2 \
-orient horizontal -resolution 4.0
update
.s get 86 152
-} -result {-76}
+} -result -76
test scale-14.9 {RoundValueToResolution procedure} -body {
.s configure -from 0 -to 2.25 -sliderlength 10 -length 114 -bd 2 \
@@ -1205,7 +1205,7 @@ test scale-14a.1 {RoundValueToResolution, RoundIntervalToResolution procedures}
.s get 200 0
} -cleanup {
destroy .s
-} -result {5}
+} -result 5
test scale-14a.2 {RoundValueToResolution, RoundIntervalToResolution procedures} -setup {
pack [scale .s -orient horizontal]
update
@@ -1226,7 +1226,7 @@ test scale-15.1 {ScaleVarProc procedure} -setup {
scale .s -from 0 -to -200 -variable y -orient horizontal -length 150
pack .s
return $y
-} -result {-130}
+} -result -130
test scale-15.2 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
@@ -1235,7 +1235,7 @@ test scale-15.2 {ScaleVarProc procedure} -setup {
pack .s
set y -87
.s get
-} -result {-87}
+} -result -87
test scale-15.3 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
@@ -1256,7 +1256,7 @@ test scale-15.4 {ScaleVarProc procedure} -setup {
.s get
} -cleanup {
deleteWindows
-} -result {-130}
+} -result -130
test scale-15.5 {ScaleVarProc procedure} -setup {
deleteWindows
} -body {
@@ -1344,7 +1344,7 @@ test scale-17.1 {bug fix 1786} -setup {
return $x
} -cleanup {
deleteWindows
-} -result {100}
+} -result 100
test scale-18.1 {DestroyScale, -cursor option [Bug: 3897]} -setup {