Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: 💍 add failing offset test #380

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/offset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,22 @@ mod tests {
fit_to_bezpath(&co, TOLERANCE);
}

/// Another cubic offset that triggers infinite recursion
// TODO make this test pass and then remove the `#[ignore]`
#[test]
#[ignore]
fn infinite_recursion_2() {
let from = (170316.27471718643, -39426.698755807460);
let ctrl1 = (170319.25792293798, -39424.62015694651);
let ctrl2 = (170347.39228816386, -39459.45980864008);
let to = (170360.02535541012, -39468.51499820177);
let offset = -1.;
let accuracy = 2.231417337053948;
let c = CubicBez::new(from, ctrl1, ctrl2, to);
let co = CubicOffset::new(c, offset);
fit_to_bezpath_opt(&co, accuracy);
}

#[test]
fn test_cubic_offset_simple_line() {
let cubic = CubicBez::new((0., 0.), (10., 0.), (20., 0.), (30., 0.));
Expand Down