0026363: Visualization, TKOpenGl - missing RayTracing shader files should be properly...
[occt.git] / tests / nproject / end
CommitLineData
40093367 1#set length 0
2if { [isdraw result] } {
3 #check if result is valid
4
5 puts [checkshape result]
6
7 set prop "length"
8 set mass $length
9 regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m
10
11 if { [string compare "$mass" "empty"] != 0 } {
12 if { $m == 0 } {
13 puts "Error : The $command is not valid. The $prop is 0."
14 }
15 if { $mass > 0 } {
16 puts "The expected $prop is $mass"
17 }
18 #check of change of length is < 1%
49c093ae 19 if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
94a57f1f 20 puts "Error : The $prop of the resulting shape is $m"
40093367 21 }
22 } else {
23 if { $m != 0 } {
24 puts "Error : The $command is not valid. The $prop is $m"
25 }
26 }
27
28 if { $m > 0 } {
29 smallview
30 clear
31 donly result
32 fit
88f8fc81 33 xwd $imagedir/${test_image}.png
40093367 34 } else {
35 smallview
36 clear
37 fit
88f8fc81 38 xwd $imagedir/${test_image}.png
40093367 39 }
40} else {
94a57f1f 41 puts "Error : The $command cannot be built."
40093367 42}
43
44# to end a test script
45puts "TEST COMPLETED"