forked from StudioInfinity/dyna3
Update assembly tests to use pointers
This commit is contained in:
parent
501cd74c96
commit
3dd6303e99
1 changed files with 8 additions and 10 deletions
|
@ -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));
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue