Root/test/frame_ref

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
6fped_dump "frame reference: with \"frame\" (origin)" <<EOF
7frame f {}
8frame f @
9EOF
10expect <<EOF
11/* MACHINE-GENERATED ! */
12
13frame f {
14}
15
16package "_"
17unit mm
18frame f @
19EOF
20
21#------------------------------------------------------------------------------
22
23fped_dump "frame reference: with \"%frame\" (current frame origin)" <<EOF
24frame f {}
25%frame f @
26EOF
27expect <<EOF
28/* MACHINE-GENERATED ! */
29
30frame f {
31}
32
33package "_"
34unit mm
35frame f @
36EOF
37
38#------------------------------------------------------------------------------
39
40fped_dump "frame reference: with \"%frame\" (current frame vector)" <<EOF
41frame f {}
42v: vec @(0mm, 0mm)
43%frame f v
44EOF
45expect <<EOF
46/* MACHINE-GENERATED ! */
47
48frame f {
49}
50
51package "_"
52unit mm
53v: vec @(0mm, 0mm)
54frame f .
55EOF
56
57#------------------------------------------------------------------------------
58
59fped_dump "frame reference: with \"%frame\" (other frame origin)" <<EOF
60frame f {}
61frame g {}
62%frame f g.@
63EOF
64expect <<EOF
65/* MACHINE-GENERATED ! */
66
67frame f {
68}
69
70frame g {
71    frame f @
72}
73
74package "_"
75unit mm
76EOF
77
78#------------------------------------------------------------------------------
79
80fped_dump "frame reference: with \"%frame\" (other frame base)" <<EOF
81frame f {}
82frame g {
83    v: vec @(0mm, 0mm)
84}
85%frame f g.v
86EOF
87expect <<EOF
88/* MACHINE-GENERATED ! */
89
90frame f {
91}
92
93frame g {
94    v: vec @(0mm, 0mm)
95    frame f .
96}
97
98package "_"
99unit mm
100EOF
101
102#------------------------------------------------------------------------------
103
104fped_fail "frame reference: with \"%frame\" (cycle)" <<EOF
105frame f {
106}
107
108frame g {
109    frame f @
110}
111
112%frame g f.@
113EOF
114expect <<EOF
1158: frame "g" is a parent of "f" near "@"
116EOF
117
118#------------------------------------------------------------------------------
119
120fped_dump "frame reference: with \"%frame\" (out-of-order)" <<EOF
121frame f {
122}
123
124frame g {
125}
126
127%frame g f.@
128EOF
129expect <<EOF
130/* MACHINE-GENERATED ! */
131
132frame g {
133}
134
135frame f {
136    frame g @
137}
138
139package "_"
140unit mm
141EOF
142
143###############################################################################
144

Archive Download this file

Branches:
master



interactive