diff options
Diffstat (limited to 'tests/visual.test')
| -rw-r--r-- | tests/visual.test | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/visual.test b/tests/visual.test index da6c41a..c4e26d2 100644 --- a/tests/visual.test +++ b/tests/visual.test @@ -28,12 +28,12 @@ proc eatColors {w} { canvas $w.c -width 400 -height 200 -bd 0 pack $w.c for {set y 0} {$y < 8} {incr y} { - for {set x 0} {$x < 40} {incr x} { - set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] - $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ - [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ - -fill $color - } + for {set x 0} {$x < 40} {incr x} { + set color [format #%02x%02x%02x [expr {$x*6}] [expr {$y*30}] 0] + $w.c create rectangle [expr {10*$x}] [expr {20*$y}] \ + [expr {10*$x + 10}] [expr {20*$y + 20}] -outline {} \ + -fill $color + } } update } @@ -51,7 +51,7 @@ proc eatColors {w} { proc colorsFree {w {red 31} {green 245} {blue 192}} { set vals [winfo rgb $w [format #%02x%02x%02x $red $green $blue]] expr {([lindex $vals 0]/256 == $red) && ([lindex $vals 1]/256 == $green) - && ([lindex $vals 2]/256 == $blue)} + && ([lindex $vals 2]/256 == $blue)} } # If more than one visual type is available for the screen, pick one @@ -62,10 +62,10 @@ set avail [winfo visualsavailable .] set other {} if {[llength $avail] > 1} { foreach visual $avail { - if {$visual != $default} { - set other $visual - break - } + if {$visual != $default} { + set other $visual + break + } } } testConstraint haveOtherVisual [expr {$other ne ""}] @@ -341,7 +341,7 @@ test visual-3.1 {Tk_GetVisual, parsing visual string} -setup { deleteWindows } -body { toplevel .t1 -width 250 -height 100 \ - -visual "[winfo visual .][winfo depth .]" + -visual "[winfo visual .][winfo depth .]" wm geometry .t1 +0+0 update concat "[winfo visual .t1] [winfo depth .t1]" @@ -529,8 +529,8 @@ test visual-8.1 {Tk_FreeColormap procedure} -setup { toplevel .t1 -width 300 -height 180 -colormap new wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { - toplevel $i -width 250 -height 150 -colormap .t1 - wm geometry $i +0+0 + toplevel $i -width 250 -height 150 -colormap .t1 + wm geometry $i +0+0 } destroy .t1 destroy .t3 @@ -545,8 +545,8 @@ test visual-8.2 {Tk_FreeColormap procedure} -constraints haveOtherVisual -setup toplevel .t1 -width 300 -height 180 -visual $other wm geometry .t1 +0+0 foreach i {.t2 .t3 .t4} { - toplevel $i -width 250 -height 150 -visual $other - wm geometry $i +0+0 + toplevel $i -width 250 -height 150 -visual $other + wm geometry $i +0+0 } destroy .t2 destroy .t3 |
