Skip to content

Commit

Permalink
Simplify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 13, 2023
1 parent 8d3bfcc commit e5d747a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/fj-kernel/src/algorithms/approx/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,10 @@ mod tests {
[[0., 1.], [TAU, 1.]],
Some(range.boundary),
)
.build(&mut services.objects)
.insert(&mut services.objects);
.build(&mut services.objects);

let tolerance = 1.;
let approx = (half_edge.deref(), surface.deref()).approx(tolerance);
let approx = (&half_edge, surface.deref()).approx(tolerance);

let expected_approx = (path, range)
.approx(tolerance)
Expand All @@ -344,12 +343,11 @@ mod tests {
let mut services = Services::new();

let surface = services.objects.surfaces.xz_plane();
let half_edge = HalfEdgeBuilder::circle(1.)
.build(&mut services.objects)
.insert(&mut services.objects);
let half_edge =
HalfEdgeBuilder::circle(1.).build(&mut services.objects);

let tolerance = 1.;
let approx = (half_edge.deref(), surface.deref()).approx(tolerance);
let approx = (&half_edge, surface.deref()).approx(tolerance);

let expected_approx =
(&half_edge.curve(), RangeOnPath::from([[0.], [TAU]]))
Expand Down

0 comments on commit e5d747a

Please sign in to comment.