8878d0ec |
1 | puts "========" |
2 | puts "OCC24932" |
3 | puts "========" |
4 | puts "" |
5 | ####################################################################################### |
6 | # addsweep does not check if the supplied variable contains a shape |
7 | ####################################################################################### |
8 | |
9 | vertex v0 0 0 0 |
10 | vertex v1 1 0 0 |
11 | edge e1 v0 v1 |
12 | wire w1 e1 |
13 | mksweep w1 |
14 | shape solid1 So |
15 | catch {addsweep solid1} msg |
16 | if ![regexp "is not a wire" $msg] { |
17 | puts "Error: addsweep did not complaint about wrong argument - solid" |
18 | } else { |
19 | puts "OK: addsweep noted wrong argument - solid" |
20 | } |
21 | |
22 | mksweep w1 |
23 | shape emptyshape |
24 | catch {addsweep emptyshape} msg |
25 | if ![regexp "is not a wire" $msg] { |
26 | puts "Error: addsweep did not complaint about wrong argument - empty shape" |
27 | } else { |
28 | puts "OK: addsweep noted wrong argument - empty shape" |
29 | } |
30 | |
31 | mksweep w1 |
32 | if [info exists undefined] {unset undefined} |
33 | catch {addsweep undefined} msg |
34 | if ![regexp "is not a wire" $msg] { |
35 | puts "Error: addsweep did not complaint about wrong argument - undefined variable" |
36 | } else { |
37 | puts "OK: addsweep noted wrong argument - undefined variable" |
38 | } |