summaryrefslogtreecommitdiffstats
path: root/tests/canvImg.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/canvImg.test')
-rw-r--r--tests/canvImg.test62
1 files changed, 24 insertions, 38 deletions
diff --git a/tests/canvImg.test b/tests/canvImg.test
index ec6fb6b..5a7cd71 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: canvImg.test,v 1.7 2003/05/08 09:35:41 dkf Exp $
+# RCS: @(#) $Id: canvImg.test,v 1.8 2004/05/23 17:34:48 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -225,37 +225,36 @@ test canvImg-7.2 {DisplayImage procedure, no image} {
update
} {}
-set i 1
.c delete all
if {[testConstraint testImageType]} {
.c create image 50 100 -image foo -tags image -anchor nw
}
.c create rect 10 10 20 20 -tags rect -fill black -width 0 -outline {}
foreach check {
- {{50 70 80 81} {70 90} {rect}}
- {{50 70 80 79} {70 90} {image}}
- {{99 70 110 81} {90 90} {rect}}
- {{101 70 110 79} {90 90} {image}}
- {{99 100 110 115} {90 110} {rect}}
- {{101 100 110 115} {90 110} {image}}
- {{99 134 110 145} {90 125} {rect}}
- {{101 136 110 145} {90 125} {image}}
- {{50 134 80 145} {70 125} {rect}}
- {{50 136 80 145} {70 125} {image}}
- {{20 134 31 145} {40 125} {rect}}
- {{20 136 29 145} {40 125} {image}}
- {{20 100 31 115} {40 110} {rect}}
- {{20 100 29 115} {40 110} {image}}
- {{20 70 31 80} {40 90} {rect}}
- {{20 70 29 79} {40 90} {image}}
- {{60 70 69 109} {70 110} {image}}
- {{60 70 71 111} {70 110} {rect}}
+ {canvImg-8.1 {50 70 80 81} {70 90} rect}
+ {canvImg-8.2 {50 70 80 79} {70 90} image}
+ {canvImg-8.3 {99 70 110 81} {90 90} rect}
+ {canvImg-8.4 {101 70 110 79} {90 90} image}
+ {canvImg-8.5 {99 100 110 115} {90 110} rect}
+ {canvImg-8.6 {101 100 110 115} {90 110} image}
+ {canvImg-8.7 {99 134 110 145} {90 125} rect}
+ {canvImg-8.8 {101 136 110 145} {90 125} image}
+ {canvImg-8.9 {50 134 80 145} {70 125} rect}
+ {canvImg-8.10 {50 136 80 145} {70 125} image}
+ {canvImg-8.11 {20 134 31 145} {40 125} rect}
+ {canvImg-8.12 {20 136 29 145} {40 125} image}
+ {canvImg-8.13 {20 100 31 115} {40 110} rect}
+ {canvImg-8.14 {20 100 29 115} {40 110} image}
+ {canvImg-8.15 {20 70 31 80} {40 90} rect}
+ {canvImg-8.16 {20 70 29 79} {40 90} image}
+ {canvImg-8.17 {60 70 69 109} {70 110} image}
+ {canvImg-8.18 {60 70 71 111} {70 110} rect}
} {
- test canvImg-8.$i {ImageToPoint procedure} testImageType {
- eval .c coords rect [lindex $check 0]
- .c gettags [eval .c find closest [lindex $check 1]]
- } [lindex $check 2]
- incr i
+ lassign $check name rectCoords testPoint result
+ test $name {ImageToPoint procedure} testImageType {
+ .c coords rect {expand}$rectCoords
+ .c gettags [.c find closest {expand}$testPoint]
+ } $result
}
.c delete all
@@ -392,16 +391,3 @@ test canvImg-11.3 {ImageChangedProc procedure} testImageType {
# cleanup
cleanupTests
return
-
-
-
-
-
-
-
-
-
-
-
-
-