Update assembly tests to use pointers
Some checks failed
/ test (pull_request) Failing after 13s

This commit is contained in:
Aaron Fenyes 2025-05-05 21:26:02 -07:00
parent 501cd74c96
commit 3dd6303e99

View file

@ -813,7 +813,7 @@ mod tests {
fn unindexed_element_test() {
let _ = create_root(|| {
let elt = Sphere::default("sphere".to_string(), 0);
elt.pose(&mut ConstraintProblem::new(1), &Slab::new());
elt.pose(&mut ConstraintProblem::new(1));
});
}
@ -821,18 +821,16 @@ mod tests {
#[should_panic(expected = "Subjects should be indexed before inversive distance regulator writes problem data")]
fn unindexed_subject_test_inversive_distance() {
let _ = create_root(|| {
let mut elts = Slab::<Rc<dyn Element>>::new();
let subjects = [0, 1].map(|k| {
elts.insert(
Rc::new(Sphere::default(format!("sphere{k}"), k))
)
});
elts[subjects[0]].set_column_index(0);
let subjects = [0, 1].map(
|k| Rc::new(Sphere::default(format!("sphere{k}"), k)) as Rc<dyn Element>
);
subjects[0].set_column_index(0);
InversiveDistanceRegulator {
subjects: subjects,
measurement: create_memo(|| 0.0),
set_point: create_signal(SpecifiedValue::try_from("0.0".to_string()).unwrap())
}.pose(&mut ConstraintProblem::new(2), &elts);
set_point: create_signal(SpecifiedValue::try_from("0.0".to_string()).unwrap()),
serial: InversiveDistanceRegulator::next_serial()
}.pose(&mut ConstraintProblem::new(2));
});
}
}