Skip to content

Commit

Permalink
Clean up approximation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 22, 2022
1 parent 8f49ba3 commit 2ba476f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/kernel/approximation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ mod tests {
Approximation {
points: vec![a, b, c, d],
segments: vec![
Segment { a: a, b: b },
Segment { a: b, b: c },
Segment { a: c, b: d },
Segment::new(a, b),
Segment::new(b, c),
Segment::new(c, d),
],
}
);
Expand All @@ -261,7 +261,7 @@ mod tests {
Approximation::for_edge(&edge_self_connected, tolerance),
Approximation {
points: vec![b, c],
segments: vec![Segment { a: b, b: c }, Segment { a: c, b: b }],
segments: vec![Segment::new(b, c), Segment::new(c, b)],
}
);

Expand All @@ -272,9 +272,9 @@ mod tests {
Approximation {
points: vec![d, c, b, a],
segments: vec![
Segment { a: d, b: c },
Segment { a: c, b: b },
Segment { a: b, b: a },
Segment::new(d, c),
Segment::new(c, b),
Segment::new(b, a),
],
}
);
Expand Down Expand Up @@ -310,9 +310,9 @@ mod tests {
Approximation {
points: vec![a, b, c],
segments: vec![
Segment { a: a, b: b },
Segment { a: b, b: c },
Segment { a: c, b: a },
Segment::new(a, b),
Segment::new(b, c),
Segment::new(c, a),
],
}
);
Expand Down Expand Up @@ -358,10 +358,10 @@ mod tests {
Approximation {
points: vec![a, b, c, d],
segments: vec![
Segment { a: a, b: b },
Segment { a: b, b: a },
Segment { a: c, b: d },
Segment { a: d, b: c },
Segment::new(a, b),
Segment::new(b, a),
Segment::new(c, d),
Segment::new(d, c),
],
}
);
Expand Down Expand Up @@ -395,7 +395,7 @@ mod tests {

let duplicate_segments_inverted = Approximation {
points: vec![a, b, c],
segments: vec![Segment { a, b }, Segment { a: b, b: a }],
segments: vec![Segment::new(a, b), Segment::new(b, a)],
};
assert!(duplicate_segments_inverted.validate().is_err());

Expand Down

0 comments on commit 2ba476f

Please sign in to comment.