mirror of
git://projects.qi-hardware.com/fped.git
synced 2025-04-21 12:27:27 +03:00
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. - fpd.y, fpd.l, README: added new directive %frame to link frames also to other frames than the current one (like in the GUI) - gui_tool.h, gui_tool.c: export is_parent_of - test/frame_ref: regression tests to ensure that frame order remains valid, even if we reference late from early frames git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5945 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
143
test/frame_ref
Executable file
143
test/frame_ref
Executable file
@@ -0,0 +1,143 @@
|
||||
#!/bin/sh
|
||||
. ./Common
|
||||
|
||||
###############################################################################
|
||||
|
||||
fped_dump "frame reference: with \"frame\" (origin)" <<EOF
|
||||
frame f {}
|
||||
frame f @
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame f {
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
frame f @
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_dump "frame reference: with \"%frame\" (current frame origin)" <<EOF
|
||||
frame f {}
|
||||
%frame f @
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame f {
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
frame f @
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_dump "frame reference: with \"%frame\" (current frame vector)" <<EOF
|
||||
frame f {}
|
||||
v: vec @(0mm, 0mm)
|
||||
%frame f v
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame f {
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
v: vec @(0mm, 0mm)
|
||||
frame f .
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_dump "frame reference: with \"%frame\" (other frame origin)" <<EOF
|
||||
frame f {}
|
||||
frame g {}
|
||||
%frame f g.@
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame f {
|
||||
}
|
||||
|
||||
frame g {
|
||||
frame f @
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_dump "frame reference: with \"%frame\" (other frame base)" <<EOF
|
||||
frame f {}
|
||||
frame g {
|
||||
v: vec @(0mm, 0mm)
|
||||
}
|
||||
%frame f g.v
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame f {
|
||||
}
|
||||
|
||||
frame g {
|
||||
v: vec @(0mm, 0mm)
|
||||
frame f .
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_fail "frame reference: with \"%frame\" (cycle)" <<EOF
|
||||
frame f {
|
||||
}
|
||||
|
||||
frame g {
|
||||
frame f @
|
||||
}
|
||||
|
||||
%frame g f.@
|
||||
EOF
|
||||
expect <<EOF
|
||||
8: frame "g" is a parent of "f" near "@"
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
fped_dump "frame reference: with \"%frame\" (out-of-order)" <<EOF
|
||||
frame f {
|
||||
}
|
||||
|
||||
frame g {
|
||||
}
|
||||
|
||||
%frame g f.@
|
||||
EOF
|
||||
expect <<EOF
|
||||
/* MACHINE-GENERATED ! */
|
||||
|
||||
frame g {
|
||||
}
|
||||
|
||||
frame f {
|
||||
frame g @
|
||||
}
|
||||
|
||||
package "_"
|
||||
unit mm
|
||||
EOF
|
||||
|
||||
###############################################################################
|
||||
Reference in New Issue
Block a user