mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-05 19:45:54 +00:00
After the merge: main's two new tests take world_state's Result, as the rest of their files do
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
@@ -1320,7 +1320,7 @@ fn reparent_carries_a_sketch_on_a_face_inside_the_moved_part() {
|
||||
run(&mut s, "sketch.circle.center", json!({"center": [0, 0], "radius": 3}));
|
||||
run(&mut s, "sketch.finish", json!({}));
|
||||
run(&mut s, "solid.extrude", json!({"sketch": "Sketch2", "distance": -3, "operation": "cut"}));
|
||||
let volume = |s: &Session| s.world_state().bodies.iter().map(|b| b.mesh().measure().volume.abs()).sum::<f64>();
|
||||
let volume = |s: &Session| s.world_state().unwrap().bodies.iter().map(|b| b.mesh().measure().volume.abs()).sum::<f64>();
|
||||
let before = volume(&s);
|
||||
let r = run(&mut s, "occurrence.reparent", json!({"occurrence": "Component2:1", "parent": "Component1"}));
|
||||
assert_eq!(r["path"].as_array().map(Vec::len), Some(2), "{r}");
|
||||
|
||||
@@ -128,7 +128,7 @@ fn a_refused_inline_rename_keeps_the_editor_and_shows_the_error() {
|
||||
assert!(h.app.menu.rename.is_some(), "the editor stays open after a refused rename");
|
||||
let (text, _, error) = h.app.status.clone().expect("the refusal is shown");
|
||||
assert!(error && text.contains("another body is called"), "{text}");
|
||||
assert!(h.app.session.world_state().body("B").is_some(), "the body keeps its name");
|
||||
assert!(h.app.session.world_state().unwrap().body("B").is_some(), "the body keeps its name");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user