3 puts "Test case check work of the new commands vselnext and vselprev"
7 proc check_highlighting { theEdgeIdx theCoords } {
8 set aNext [expr ($theEdgeIdx + 1) % 3]
9 set aNextNext [expr ($theEdgeIdx + 2) % 3]
10 set hiColor [vreadpixel [lindex $theCoords [expr $theEdgeIdx * 2] ] [lindex $theCoords [expr $theEdgeIdx * 2 + 1] ] name]
11 set nextColor [vreadpixel [lindex $theCoords [expr $aNext * 2] ] [lindex $theCoords [expr $aNext * 2 + 1] ] name]
12 set nextNextColor [vreadpixel [lindex $theCoords [expr $aNextNext * 2] ] [lindex $theCoords [expr $aNextNext * 2 + 1] ] name]
14 if {$hiColor == "CYAN 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} {
38 if { ![check_highlighting 0 $coords] } {
39 puts "ERROR: incorrect highlighting of edge 10"
43 if { ![check_highlighting 1 $coords] } {
44 puts "ERROR: incorrect highlighting of edge 2 after vselnext call"
47 if { ![check_highlighting 2 $coords] } {
48 puts "ERROR: incorrect highlighting of edge 1 after vselnext call"
51 if { ![check_highlighting 0 $coords] } {
52 puts "ERROR: incorrect highlighting of edge 10 after vselnext call"
56 if { ![check_highlighting 2 $coords] } {
57 puts "ERROR: incorrect highlighting of edge 1 after vselprev call"
60 if { ![check_highlighting 1 $coords] } {
61 puts "ERROR: incorrect highlighting of edge 2 after vselprev call"
64 if { ![check_highlighting 0 $coords] } {
65 puts "ERROR: incorrect highlighting of edge 10 after vselprev call"