Skip to content

Commit

Permalink
chore(tests): use Relate for testing
Browse files Browse the repository at this point in the history
Authored-by: RobWalt <robwalter96@gmail.com>
  • Loading branch information
RobWalt committed Feb 1, 2024
1 parent 93c8261 commit c11f8fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions geo/src/algorithm/stitch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ fn try_stitch<F: GeoFloat>(a: &[Coord<F>], b: &[Coord<F>]) -> Option<Vec<Coord<F
#[cfg(test)]
mod polygon_stitching_tests {

use crate::{Area, TriangulateEarcut, Winding};
use crate::{Relate, TriangulateEarcut, Winding};

use super::*;
use geo_types::*;
Expand All @@ -425,7 +425,7 @@ mod polygon_stitching_tests {

let result = tris.stitch_triangulation().unwrap();

assert!(mp.contains(&result) && result.contains(&mp));
assert!(mp.relate(&result).is_equal_topo());
}

#[test]
Expand Down Expand Up @@ -476,9 +476,9 @@ mod polygon_stitching_tests {
.stitch_triangulation()
.unwrap();

assert_eq!(result_1.unsigned_area(), result_2.unsigned_area());
assert_eq!(result_2.unsigned_area(), result_3.unsigned_area());
assert_eq!(result_3.unsigned_area(), result_4.unsigned_area());
assert!(result_1.relate(&result_2).is_equal_topo());
assert!(result_2.relate(&result_3).is_equal_topo());
assert!(result_3.relate(&result_4).is_equal_topo());
}

#[test]
Expand Down

0 comments on commit c11f8fe

Please sign in to comment.