Tk Source Code

Check-in [497ab896]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add new test scale-14.13 to guard against regressions with [220665ffff], and duplicates [220265ffff] and [779559ffff]. This test currently fails in the present bugfix branch but passes in core-8-6-branch
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-3003895fff | bug-1899040fff
Files: files | file ages | folders
SHA3-256: 497ab89644bac97417d4c4f930c80358ae8889325bacce23d09de1b3f05898cd
User & Date: fvogel 2019-01-09 21:58:56
Context
2019-01-13
14:35
Fix [3003895fff] and [1899040fff] with a different fix, this time it does not resurrect [220665ffff] or duplicates [220265ffff] [779559ffff]. All scale.test tests do pass now. check-in: 83c7e670 user: fvogel tags: bug-3003895fff, bug-1899040fff
2019-01-09
21:58
Add new test scale-14.13 to guard against regressions with [220665ffff], and duplicates [220265ffff] and [779559ffff]. This test currently fails in the present bugfix branch but passes in core-8-6-branch check-in: 497ab896 user: fvogel tags: bug-3003895fff, bug-1899040fff
2019-01-05
20:55
Fix [3003895fff] and [1899040fff]: TkRoundToResolution doesn't account for -from check-in: 4a9a1264 user: fvogel tags: bug-3003895fff, bug-1899040fff
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/scale.test.

1178
1179
1180
1181
1182
1183
1184













1185
1186
1187
1188
1189
1190
1191
test scale-14.12 {RoundValueToResolution procedure} -body {
    .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \
        -orient horizontal -resolution 0 -digits 5
    update
    .s get 86 152
} -result {168.75}
destroy .s














test scale-14a.1 {RoundValueToResolution, RoundIntervalToResolution procedures} -setup {
    pack [scale .s -orient horizontal]
    update
} -body {
    .s configure -length 400 -bd 0 -from 1 -to 9 -resolution 2 -tickinterval 1
    update







>
>
>
>
>
>
>
>
>
>
>
>
>







1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
test scale-14.12 {RoundValueToResolution procedure} -body {
    .s configure -from 0 -to 225 -sliderlength 10 -length 114 -bd 2 \
        -orient horizontal -resolution 0 -digits 5
    update
    .s get 86 152
} -result {168.75}
destroy .s

test scale-14.13 {RoundValueToResolution procedure, round-off errors} -setup {
    # see [220665ffff], and duplicates [220265ffff] and [779559ffff]
    set x NotSet
    pack [scale .s -orient horizontal -resolution .1 -from -180 -to 180 -command "set x"]
    update
} -body {
    .s configure -background red
    update
    set x
} -cleanup {
    destroy .s
} -result {NotSet}

test scale-14a.1 {RoundValueToResolution, RoundIntervalToResolution procedures} -setup {
    pack [scale .s -orient horizontal]
    update
} -body {
    .s configure -length 400 -bd 0 -from 1 -to 9 -resolution 2 -tickinterval 1
    update