mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-28 19:09:25 +00:00
Simplify test
This commit is contained in:
parent
870c996411
commit
51623d5328
@ -150,8 +150,9 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::{
|
use crate::{
|
||||||
builder::{CurveBuilder, CycleBuilder, FaceBuilder},
|
builder::{CycleBuilder, FaceBuilder},
|
||||||
partial::{Partial, PartialCurve, PartialFace, PartialObject},
|
geometry::path::SurfacePath,
|
||||||
|
partial::{Partial, PartialFace, PartialObject},
|
||||||
services::Services,
|
services::Services,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -161,9 +162,7 @@ mod tests {
|
|||||||
fn compute() {
|
fn compute() {
|
||||||
let mut services = Services::new();
|
let mut services = Services::new();
|
||||||
|
|
||||||
let mut curve = PartialCurve::default();
|
let (curve, _) = SurfacePath::line_from_points([[-3., 0.], [-2., 0.]]);
|
||||||
curve.update_as_line_from_points([[-3., 0.], [-2., 0.]]);
|
|
||||||
let curve = curve.build(&mut services.objects);
|
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
let exterior = [
|
let exterior = [
|
||||||
@ -197,10 +196,7 @@ mod tests {
|
|||||||
|
|
||||||
let expected =
|
let expected =
|
||||||
CurveFaceIntersection::from_intervals([[[1.], [2.]], [[4.], [5.]]]);
|
CurveFaceIntersection::from_intervals([[[1.], [2.]], [[4.], [5.]]]);
|
||||||
assert_eq!(
|
assert_eq!(CurveFaceIntersection::compute(&curve, &face), expected);
|
||||||
CurveFaceIntersection::compute(&curve.path(), &face),
|
|
||||||
expected
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user