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:
jyviko
2026-11-02 10:30:35 -05:00
parent 6f7e51acb5
commit 8f0c79b209
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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}");
+1 -1
View File
@@ -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]