Root/
Source at commit 82a12023cdc81c3a4768ac8339b28f3a561272de created 13 years 11 months ago. By werner, I thought there was a bug in frame ordering, but it turns out that it works fine. Anyway, here's a new debug construct (%frame) and a bunch of new regression tests. | |
---|---|
1 | #!/bin/sh |
2 | . ./Common |
3 | |
4 | ############################################################################### |
5 | |
6 | fped_dump "frame reference: with \"frame\" (origin)" <<EOF |
7 | frame f {} |
8 | frame f @ |
9 | EOF |
10 | expect <<EOF |
11 | /* MACHINE-GENERATED ! */ |
12 | |
13 | frame f { |
14 | } |
15 | |
16 | package "_" |
17 | unit mm |
18 | frame f @ |
19 | EOF |
20 | |
21 | #------------------------------------------------------------------------------ |
22 | |
23 | fped_dump "frame reference: with \"%frame\" (current frame origin)" <<EOF |
24 | frame f {} |
25 | %frame f @ |
26 | EOF |
27 | expect <<EOF |
28 | /* MACHINE-GENERATED ! */ |
29 | |
30 | frame f { |
31 | } |
32 | |
33 | package "_" |
34 | unit mm |
35 | frame f @ |
36 | EOF |
37 | |
38 | #------------------------------------------------------------------------------ |
39 | |
40 | fped_dump "frame reference: with \"%frame\" (current frame vector)" <<EOF |
41 | frame f {} |
42 | v: vec @(0mm, 0mm) |
43 | %frame f v |
44 | EOF |
45 | expect <<EOF |
46 | /* MACHINE-GENERATED ! */ |
47 | |
48 | frame f { |
49 | } |
50 | |
51 | package "_" |
52 | unit mm |
53 | v: vec @(0mm, 0mm) |
54 | frame f . |
55 | EOF |
56 | |
57 | #------------------------------------------------------------------------------ |
58 | |
59 | fped_dump "frame reference: with \"%frame\" (other frame origin)" <<EOF |
60 | frame f {} |
61 | frame g {} |
62 | %frame f g.@ |
63 | EOF |
64 | expect <<EOF |
65 | /* MACHINE-GENERATED ! */ |
66 | |
67 | frame f { |
68 | } |
69 | |
70 | frame g { |
71 | frame f @ |
72 | } |
73 | |
74 | package "_" |
75 | unit mm |
76 | EOF |
77 | |
78 | #------------------------------------------------------------------------------ |
79 | |
80 | fped_dump "frame reference: with \"%frame\" (other frame base)" <<EOF |
81 | frame f {} |
82 | frame g { |
83 | v: vec @(0mm, 0mm) |
84 | } |
85 | %frame f g.v |
86 | EOF |
87 | expect <<EOF |
88 | /* MACHINE-GENERATED ! */ |
89 | |
90 | frame f { |
91 | } |
92 | |
93 | frame g { |
94 | v: vec @(0mm, 0mm) |
95 | frame f . |
96 | } |
97 | |
98 | package "_" |
99 | unit mm |
100 | EOF |
101 | |
102 | #------------------------------------------------------------------------------ |
103 | |
104 | fped_fail "frame reference: with \"%frame\" (cycle)" <<EOF |
105 | frame f { |
106 | } |
107 | |
108 | frame g { |
109 | frame f @ |
110 | } |
111 | |
112 | %frame g f.@ |
113 | EOF |
114 | expect <<EOF |
115 | 8: frame "g" is a parent of "f" near "@" |
116 | EOF |
117 | |
118 | #------------------------------------------------------------------------------ |
119 | |
120 | fped_dump "frame reference: with \"%frame\" (out-of-order)" <<EOF |
121 | frame f { |
122 | } |
123 | |
124 | frame g { |
125 | } |
126 | |
127 | %frame g f.@ |
128 | EOF |
129 | expect <<EOF |
130 | /* MACHINE-GENERATED ! */ |
131 | |
132 | frame g { |
133 | } |
134 | |
135 | frame f { |
136 | frame g @ |
137 | } |
138 | |
139 | package "_" |
140 | unit mm |
141 | EOF |
142 | |
143 | ############################################################################### |
144 |
Branches:
master