From e8e26db71c2681f58a4f50bcceb47a286a2feacc Mon Sep 17 00:00:00 2001 From: brett19 Date: Sat, 31 Oct 2026 02:23:09 -0700 Subject: [PATCH] Tests hold what they measured: 871's refusal is NoRoom, no prints The ring and lip test says it does not single out the crossing flag: it passes with the flag off on this path. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MNXLXkZLQ6T7TSi4wswcmk --- crates/kernel/src/taper_mesh_tests.rs | 1 - crates/smlib/src/core/blend_tests.rs | 3 +-- crates/smlib/src/core/boolean_tests.rs | 9 ++------- crates/smlib/src/core/offset_tests.rs | 1 - 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/kernel/src/taper_mesh_tests.rs b/crates/kernel/src/taper_mesh_tests.rs index d70ba9fbe..410a4c352 100644 --- a/crates/kernel/src/taper_mesh_tests.rs +++ b/crates/kernel/src/taper_mesh_tests.rs @@ -17,7 +17,6 @@ fn wedge() -> Body { #[test] fn the_wedge_round_keeps_its_volume() { let v = crate::measure(&wedge()).unwrap().volume; - println!("wedge V {v:?}"); assert!((v - 5223.0386).abs() < 1e-3, "{v}"); } diff --git a/crates/smlib/src/core/blend_tests.rs b/crates/smlib/src/core/blend_tests.rs index 337a80693..c07820a8d 100644 --- a/crates/smlib/src/core/blend_tests.rs +++ b/crates/smlib/src/core/blend_tests.rs @@ -869,7 +869,7 @@ fn rounds_on_the_871_part() { let fit = blend(&p, Blend::Round, &e, &sizes(0.5), TOL, &[], &[], Corners::Filled).unwrap(); let (v, n) = (volume(&fit, 1e-8).unwrap(), counts(&fit).unwrap()); let refused = blend(&p, Blend::Round, &e, &sizes(1.0), TOL, &[], &[], Corners::Filled).map(|_| ()).unwrap_err(); - println!("871 solidcore: r 0.5 V {v:.6} {n:?} (closed form {exact:.6}); r 1: {refused:?}"); + assert_eq!(refused, Error::NoRoom); assert_eq!(n[0], 38); assert!((v - exact).abs() < 1e-3, "{v} vs {exact}"); #[cfg(feature = "native")] @@ -889,7 +889,6 @@ fn rounds_on_the_871_part() { let fit = ffi::ops::blend(ffi::ops::BLEND_ROUND, h, &e, &sizes(0.5), TOL).unwrap(); let (cv, cn) = (ffi::volume(&fit, 1e-8).unwrap(), ffi::counts(&fit).unwrap().map(|x| usize::try_from(x).unwrap())); let crefused = ffi::ops::blend(ffi::ops::BLEND_ROUND, h, &e, &sizes(1.0), TOL).map(|_| ()); - println!("871 C++: r 0.5 V {cv:.6} {cn:?}; r 1: {crefused:?}"); assert!(rel(v, cv) < 1e-9, "solidcore {v} vs C++ {cv}"); assert_eq!(n, cn); assert!(crefused.is_err()); diff --git a/crates/smlib/src/core/boolean_tests.rs b/crates/smlib/src/core/boolean_tests.rs index f64171169..a3af43a23 100644 --- a/crates/smlib/src/core/boolean_tests.rs +++ b/crates/smlib/src/core/boolean_tests.rs @@ -714,6 +714,8 @@ fn object_names_stay_distinct_past_a_million() { /// with a half annulus prism, r 4..5 about (e, 10), z 2..20, whose cap sits on the ring's top. Two /// equal circles a little apart cross; they do not coincide over a tiny edge. The stack's volume /// is 113 pi whatever e is. +/// This path passes with `simple_coincidence_crossing_is_point` off too, so the test holds the +/// result here and does not single out that flag (solidcore's own test does). #[test] fn a_ring_and_a_lip_with_walls_nearly_together() { use super::sweep::extrude; @@ -738,13 +740,6 @@ fn a_ring_and_a_lip_with_walls_nearly_together() { let u = boolean(&ring, &lip, BooleanOp::Union).unwrap().unwrap(); let v = volume(&u, 1e-8).unwrap(); let report = super::check(&u, crate::check::CheckLevel::All).unwrap(); - println!( - "ring + lip e {e}: V {v:.6} solids {} manifold solid {} valid {} counts {:?}", - solid_count(&u).unwrap(), - super::is_manifold_solid(&u).unwrap(), - report.is_valid(), - counts(&u).unwrap() - ); assert!(report.is_valid(), "e {e}: {report}"); assert_eq!(solid_count(&u).unwrap(), 1, "e {e}"); assert!(super::is_manifold_solid(&u).unwrap(), "e {e}"); diff --git a/crates/smlib/src/core/offset_tests.rs b/crates/smlib/src/core/offset_tests.rs index 7c2ac975c..13bfd402f 100644 --- a/crates/smlib/src/core/offset_tests.rs +++ b/crates/smlib/src/core/offset_tests.rs @@ -830,7 +830,6 @@ fn offset_faces_close_a_step_wall() { for (at, d, v, a) in [([30.0, 15.0, 10.0], 10.0, 24000.0, 5200.0), ([10.0, 15.0, 20.0], -10.0, 12000.0, 3800.0)] { let r = offset_faces(&stepped, &[at], 0.1, d).unwrap(); let (got, n, area) = (volume(&r, 1e-8).unwrap(), counts(&r).unwrap(), super::area(&r, 1e-8).unwrap()); - println!("step wall d {d}: V {got} A {area} {n:?}"); assert_eq!(n[0], 6, "d {d}"); assert!(rel(got, v) < 1e-9 && rel(area, a) < 1e-9, "d {d}: V {got} A {area}"); }