Skip to content

Commit c1a4b96

Browse files
author
Richard Dodd
committed
test: 💍 add failing offset test
This patch doesn't (yet) have a fix, but it records the problem.
1 parent 7ccb271 commit c1a4b96

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/offset.rs

+15
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,21 @@ mod tests {
199199
fit_to_bezpath(&co, TOLERANCE);
200200
}
201201

202+
/// Another cubic offset that used to trigger infinite recursion
203+
#[test]
204+
#[ignore]
205+
fn infinite_recursion_2() {
206+
let from = (170316.27471718643, -39426.698755807460);
207+
let ctrl1 = (170319.25792293798, -39424.62015694651);
208+
let ctrl2 = (170347.39228816386, -39459.45980864008);
209+
let to = (170360.02535541012, -39468.51499820177);
210+
let offset = -1.;
211+
let accuracy = 2.231417337053948;
212+
let c = CubicBez::new(from, ctrl1, ctrl2, to);
213+
let co = CubicOffset::new(c, offset);
214+
fit_to_bezpath_opt(&co, accuracy);
215+
}
216+
202217
#[test]
203218
fn test_cubic_offset_simple_line() {
204219
let cubic = CubicBez::new((0., 0.), (10., 0.), (20., 0.), (30., 0.));

0 commit comments

Comments
 (0)