Refactor to simplify

This commit is contained in:
Hanno Braun 2024-05-17 14:42:21 +02:00
parent 10e372f001
commit 0d2c46dd43

View File

@ -132,7 +132,6 @@ impl ValidationCheck<Shell> for CurveGeometryMismatch {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::{ use crate::{
assert_contains_err,
operations::{ operations::{
build::BuildShell, build::BuildShell,
geometry::UpdateHalfEdgeGeometry, geometry::UpdateHalfEdgeGeometry,
@ -140,10 +139,7 @@ mod tests {
update::{UpdateCycle, UpdateFace, UpdateRegion, UpdateShell}, update::{UpdateCycle, UpdateFace, UpdateRegion, UpdateShell},
}, },
topology::{HalfEdge, Shell}, topology::{HalfEdge, Shell},
validate::Validate, validation::{checks::CurveGeometryMismatch, ValidationCheck},
validation::{
checks::CurveGeometryMismatch, ValidationCheck, ValidationError,
},
Core, Core,
}; };
@ -199,12 +195,11 @@ mod tests {
}, },
&mut core, &mut core,
); );
assert!(CurveGeometryMismatch::check_and_return_first_error(
assert_contains_err!( &invalid,
core, &core.layers.geometry,
invalid, )
ValidationError::CurveGeometryMismatch(..) .is_err());
);
Ok(()) Ok(())
} }