diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-08 06:23:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-08 06:23:40 (GMT) |
commit | dc2c36cea500db6933ade16c3252cef0a66ab26d (patch) | |
tree | 0b7650bc7c53e1dca25ec6facfe279368c9046a6 /tests/constraints.tcl | |
parent | 6f2824501d0987043c6456d5ab00adbb4300b682 (diff) | |
download | tk-dc2c36cea500db6933ade16c3252cef0a66ab26d.zip tk-dc2c36cea500db6933ade16c3252cef0a66ab26d.tar.gz tk-dc2c36cea500db6933ade16c3252cef0a66ab26d.tar.bz2 |
Simplify throughout: ButtonPress -> Button, KeyPress -> Key (or remove it because it is the default anyway)
Use 'in' operator in stead of 'lsearch -exact' when possible
Diffstat (limited to 'tests/constraints.tcl')
-rw-r--r-- | tests/constraints.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/constraints.tcl b/tests/constraints.tcl index ff036f3..9b48e8d 100644 --- a/tests/constraints.tcl +++ b/tests/constraints.tcl @@ -197,8 +197,8 @@ testConstraint noExceed [expr { }] # constraints for testing facilities defined in the tktest executable... -testConstraint testImageType [expr {[lsearch [image types] test] >= 0}] -testConstraint testOldImageType [expr {[lsearch [image types] oldtest] >= 0}] +testConstraint testImageType [expr {"test" in [image types]}] +testConstraint testOldImageType [expr {"oldtest" in [image types]}] testConstraint testbitmap [llength [info commands testbitmap]] testConstraint testborder [llength [info commands testborder]] testConstraint testcbind [llength [info commands testcbind]] @@ -247,10 +247,10 @@ testConstraint pseudocolor8 [expr { }] destroy .t testConstraint haveTruecolor24 [expr { - [lsearch -exact [winfo visualsavailable .] {truecolor 24}] >= 0 + {truecolor 24} in [winfo visualsavailable .] }] testConstraint haveGrayscale8 [expr { - [lsearch -exact [winfo visualsavailable .] {grayscale 8}] >= 0 + {grayscale 8} in [winfo visualsavailable .] }] testConstraint defaultPseudocolor8 [expr { ([winfo visual .] eq "pseudocolor") && ([winfo depth .] == 8) |