diff options
Diffstat (limited to 'tests/scale.test')
-rw-r--r-- | tests/scale.test | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/tests/scale.test b/tests/scale.test index 38c3e9a..2c3a8c2 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -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"} @@ -324,7 +324,7 @@ test scale-2.1 {Tk_ScaleCmd procedure} -body { scale } -returnCodes error -result {wrong # args: should be "scale pathName ?-option value ...?"} test scale-2.2 {Tk_ScaleCmd procedure} -body { - scale foo + scale foo } -returnCodes error -result {bad window path name "foo"} test scale-2.3 {Tk_ScaleCmd procedure} -body { catch {scale foo} @@ -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 @@ -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 @@ -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 { @@ -1364,7 +1364,7 @@ test scale-18.2 {Scale button 1 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <1> -x 0 -y 0 + event generate .s <Button-1> -x 0 -y 0 event generate .s <ButtonRelease-1> -x 0 -y 0 update set ::error @@ -1385,7 +1385,7 @@ test scale-18.3 {Scale button 2 events [Bug 787065]} -setup { pack .s tkwait visibility .s list [catch { - event generate .s <2> -x 0 -y 0 + event generate .s <Button-2> -x 0 -y 0 event generate .s <ButtonRelease-2> -x 0 -y 0 update set ::error @@ -1411,16 +1411,16 @@ test scale-19 {Bug [3529885fff] - Click in through goes in wrong direction} \ } \ -body { foreach {x y} [.s1 coord 50] {} - event generate .s1 <1> -x $x -y $y + event generate .s1 <Button-1> -x $x -y $y event generate .s1 <ButtonRelease-1> -x $x -y $y foreach {x y} [.s2 coord 50] {} - event generate .s2 <1> -x $x -y $y + event generate .s2 <Button-1> -x $x -y $y event generate .s2 <ButtonRelease-1> -x $x -y $y foreach {x y} [.s3 coord 50] {} - event generate .s3 <1> -x $x -y $y + event generate .s3 <Button-1> -x $x -y $y event generate .s3 <ButtonRelease-1> -x $x -y $y foreach {x y} [.s4 coord 50] {} - event generate .s4 <1> -x $x -y $y + event generate .s4 <Button-1> -x $x -y $y event generate .s4 <ButtonRelease-1> -x $x -y $y update list $x1 $x2 $x3 $x4 |