0023657: Fails compilation with WOK after patch 22980
[occt.git] / tests / bugs / step / end
CommitLineData
e54706ed 1if { [info exist check_square] } {
2 if { [info exists square] } {
3 set prop "square"
4 set mass $square
5 regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full m
6 }
7
8 if { [info exists volume] } {
9 set prop "volume"
10 set mass $volume
11 regexp {Mass +: +([-0-9.+eE]+)} [vprops result] full m
12 }
13
14 if { [info exists length] } {
15 set prop "length"
16 set mass $length
17 regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full m
18 puts "checksection"
19 puts [checksection result]
20 }
21
22 #if mass (length or square) is empty in test case then result should be an empty shape.
23 if { [string compare "$mass" "empty"] != 0 } {
24 if { $m == 0 } {
25 puts "Error : The command is not valid. The $prop is 0."
26 }
27 if { $mass > 0 } {
28 puts "The expected $prop is $mass"
29 }
30 #check of change of square is < 1%
31 if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > 0.01) || ($mass == 0 && $m != 0) } {
32 puts "Error : The $prop of result shape is $m"
33 }
34 } else {
35 if { $m != 0 } {
36 puts "Error : The command is not valid. The $prop is $m"
37 }
38 }
39}
40if { [info exists nb_v_good] } {
41 regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v
42 if { ${nb_v} != ${nb_v_good} } {
43 puts "Error : Result shape is WRONG because it must contains ${nb_v_good} vertexes instead of ${nb_v}"
44 } else {
45 puts "Result shape contains ${nb_v} vertexes"
46 }
47}
48
49if { [info exists nb_e_good] } {
50 regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e
51 if { ${nb_e} != ${nb_e_good} } {
52 puts "Error : Result shape is WRONG because it must contains ${nb_e_good} edges instead of ${nb_e}"
53 } else {
54 puts "Result shape contains ${nb_e} edges"
55 }
56}
57
58if { [info exists nb_w_good] } {
59 regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w
60 if { ${nb_w} != ${nb_w_good} } {
61 puts "Error : Result shape is WRONG because it must contains ${nb_w_good} wires instead of ${nb_w}"
62 } else {
63 puts "Result shape contains ${nb_w} wires"
64 }
65}
66
67if { [info exists nb_f_good] } {
68 regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f
69 if { ${nb_f} != ${nb_f_good} } {
70 puts "Error : Result shape is WRONG because it must contains ${nb_f_good} faces instead of ${nb_f}"
71 } else {
72 puts "Result shape contains ${nb_f} faces"
73 }
74}
75
76if { [info exists nb_sh_good] } {
77 regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh
78 if { ${nb_sh} != ${nb_sh_good} } {
79 puts "Error : Result shape is WRONG because it must contains ${nb_sh_good} shells instead of ${nb_sh}"
80 } else {
81 puts "Result shape contains ${nb_sh} shells"
82 }
83}
84
85if { [info exists nb_sol_good] } {
86 regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol
87 if { ${nb_sol} != ${nb_sol_good} } {
88 puts "Error : Result shape is WRONG because it must contains ${nb_sol_good} solids instead of ${nb_sol}"
89 } else {
90 puts "Result shape contains ${nb_sol} solids"
91 }
92}
93
94if { [info exists nb_compsol_good] } {
95 regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol
96 if { ${nb_compsol} != ${nb_compsol_good} } {
97 puts "Error : Result shape is WRONG because it must contains ${nb_compsol_good} compsolids instead of ${nb_compsol}"
98 } else {
99 puts "Result shape contains ${nb_compsol} compsolids"
100 }
101}
102
103if { [info exists nb_compound_good] } {
104 regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound
105 if { ${nb_compound} != ${nb_compound_good} } {
106 puts "Error : Result shape is WRONG because it must contains ${nb_compound_good} compounds instead of ${nb_compound}"
107 } else {
108 puts "Result shape contains ${nb_compound} compounds"
109 }
110}
111
112if { [info exists nb_shape_good] } {
113 regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape
114 if { ${nb_shape} != ${nb_shape_good} } {
115 puts "Error : Result shape is WRONG because it must contains ${nb_shape_good} shapes instead of ${nb_shape}"
116 } else {
117 puts "Result shape contains ${nb_shape} shapes"
118 }
119}
120