mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:04:16 +02:00
test/bugs: add regression tests for p2d_no_intersect and angle_3 bugs
That's commits84f9d3c3b4
and7ca942d0e9
This commit is contained in:
parent
149fc262ff
commit
ae8d393859
40
poly2d/test/bugs
Executable file
40
poly2d/test/bugs
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
. ./Common
|
||||
|
||||
###############################################################################
|
||||
|
||||
tst "bug: p2d_no_intersect could wrap around and bite itself" <<EOF
|
||||
struct p2d *p = p2d_new();
|
||||
|
||||
p2d_append(p, v2d_new(0, 0));
|
||||
p2d_append(p, v2d_new(1, 27.8058649225));
|
||||
p2d_append(p, v2d_new(1, 2));
|
||||
p2d_close(p);
|
||||
p2d_area(p, 3, 3);
|
||||
EOF
|
||||
|
||||
expect <<EOF
|
||||
EOF
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
tst "bug: collinear path segments tripped angle_3" <<EOF
|
||||
struct p2d *p = p2d_new();
|
||||
struct p2d *q;
|
||||
|
||||
p2d_append(p, v2d_new(0, 0));
|
||||
p2d_append(p, v2d_new(1, 27.8058649225));
|
||||
p2d_append(p, v2d_new(1, 2.0947540869));
|
||||
p2d_append(p, v2d_new(1, 2));
|
||||
p2d_close(p);
|
||||
q = p2d_area(p, 3, 3);
|
||||
p2d_write_gnuplot_all(stdout, q);
|
||||
EOF
|
||||
|
||||
# Not output since the polygon is too small. This did not cause the above bug
|
||||
# but just happened to be a property of the problem polygon.
|
||||
|
||||
expect <<EOF
|
||||
EOF
|
||||
|
||||
###############################################################################
|
Loading…
Reference in New Issue
Block a user