40093367 |
1 | ## ================================== |
2 | ## File : End file for FEAT grids |
3 | ## Date : 01.02.2012 |
4 | ## ================================== |
5 | |
6 | if { [isdraw result] } { |
7 | regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m |
8 | |
9 | #check if result is valid |
10 | puts [checkshape result] |
11 | if { $m == 0 } { |
94a57f1f |
12 | puts "Error : The feat grid is not valid. The area is 0." |
40093367 |
13 | } |
14 | |
15 | if { $square > 0 } { |
94a57f1f |
16 | puts "The expected area is $square" |
40093367 |
17 | } |
18 | #check of change of square is < 1% |
49c093ae |
19 | if { ($square != 0 && [expr 1.*abs($square - $m)/$square] > 0.01) || ($square == 0 && $m != 0) } { |
94a57f1f |
20 | puts "Error : The area of the resulting shape is $m" |
40093367 |
21 | } |
22 | if { $m > 0 } { |
23 | clear |
24 | smallview |
25 | donly result |
26 | fit |
88f8fc81 |
27 | xwd $imagedir/${test_image}.png |
40093367 |
28 | } |
29 | } else { |
94a57f1f |
30 | puts "Error : The feat grid cannot be built." |
40093367 |
31 | } |
32 | |
33 | # to end a test script |
34 | puts "TEST COMPLETED" |