Skip to content

Commit

Permalink
Add unit test for red-dress failure
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueDoctor committed Sep 5, 2024
1 parent de41cfc commit efc3860
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libraries/path-bool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ mod test {

let result = path_boolean(&a, FillRule::NonZero, &b, FillRule::NonZero, PathBooleanOperation::Union).unwrap();

// Add assertions here based on expected results
assert_eq!(result.len(), 1, "Expected 1 resulting path for Union operation");
// Add more specific assertions about the resulting path if needed
}
#[test]
fn red_dress_loop() {
let a = path_from_path_data("M969.000000,0.000000C969.000000,0.000000 1110.066898,76.934393 1085.000000,181.000000 C1052.000000,318.000000 1199.180581,334.301571 1277.000000,319.000000 C1455.000000,284.000000 1586.999985,81.000000 1418.000000,0.000000 C1418.000000,0.000000 969.000000,0.000000 969.000000,0.000000");
let b = path_from_path_data(
"M1211.000000,0.000000C1211.000000,0.000000 1255.000000,78.000000 1536.000000,95.000000 C1536.000000,95.000000 1536.000000,0.000000 1536.000000,0.000000 C1536.000000,0.000000 1211.000000,0.000000 1211.000000,0.000000 Z",
);

let result = path_boolean(&a, FillRule::NonZero, &b, FillRule::NonZero, PathBooleanOperation::Intersection).unwrap();

// Add assertions here based on expected results
assert_eq!(result.len(), 1, "Expected 1 resulting path for Union operation");
// Add more specific assertions about the resulting path if needed
Expand Down

0 comments on commit efc3860

Please sign in to comment.