Root/test/del_frame

Source at commit 377b7f81193685f23c93546767a059e194419446 created 3 years 5 months ago.
By Werner Almesberger, fped.c: new option -m (for -p and -P) to suppress showing measurements
1#!/bin/sh
2. ./Common
3
4###############################################################################
5
6fped_fail "delete frame: can't self-destruct" <<EOF
7frame f {
8    %del f
9}
10EOF
11expect <<EOF
123: a frame can't delete itself near "}"
13EOF
14
15#------------------------------------------------------------------------------
16
17fped_dump "delete frame: content disappears" <<EOF
18frame f {
19    vec @(0mm, 0mm)
20}
21
22%del f
23EOF
24expect <<EOF
25/* MACHINE-GENERATED ! */
26
27package "_"
28unit mm
29
30EOF
31
32#------------------------------------------------------------------------------
33
34fped_dump "delete frame: references disappear" <<EOF
35frame f {
36    vec @(0mm, 0mm)
37}
38
39frame f @
40
41%del f
42EOF
43expect <<EOF
44/* MACHINE-GENERATED ! */
45
46package "_"
47unit mm
48
49EOF
50
51#------------------------------------------------------------------------------
52
53fped_dump "delete frame: measurements disappear" <<EOF
54frame f {
55    v: vec @(0mm, 0mm)
56}
57
58frame f @
59meas f.v -> f.v
60
61%del f
62EOF
63expect <<EOF
64/* MACHINE-GENERATED ! */
65
66package "_"
67unit mm
68
69EOF
70
71#------------------------------------------------------------------------------
72
73fped_dump "delete frame: measurements with qualifiers disappear" <<EOF
74frame f {
75    v: vec @(0mm, 0mm)
76}
77
78frame g { frame f @ }
79
80frame g @
81meas g/f.v -> f.v
82
83%del g
84EOF
85expect <<EOF
86/* MACHINE-GENERATED ! */
87
88frame f {
89    v: vec @(0mm, 0mm)
90}
91
92package "_"
93unit mm
94
95EOF
96
97###############################################################################
98

Archive Download this file

Branches:
master



interactive