improve future_moves tests
This commit is contained in:
parent
ad39d647b7
commit
aad3ea0c0a
@ -374,7 +374,7 @@ mod tests {
|
||||
lazy_children: false,
|
||||
});
|
||||
|
||||
futm.current_root = Some(0);
|
||||
futm.update_root_idx_raw(0);
|
||||
|
||||
// child 1
|
||||
futm.arena.push(Move::new(
|
||||
@ -442,9 +442,23 @@ mod tests {
|
||||
lazy_children: false,
|
||||
});
|
||||
|
||||
futm.current_root = Some(0);
|
||||
futm.update_root_idx_raw(0);
|
||||
|
||||
futm.extend_layers();
|
||||
assert_eq!(futm.arena_len(), 5);
|
||||
|
||||
// move to a child
|
||||
futm.update_root_idx_raw(1);
|
||||
futm.refocus_tree();
|
||||
assert_eq!(futm.arena_len(), 1);
|
||||
|
||||
// make sure current_root is properly updated
|
||||
assert_eq!(futm.current_root, Some(0));
|
||||
|
||||
futm.extend_layers();
|
||||
assert!(
|
||||
futm.arena_len() > 1,
|
||||
"extend_layer didn't grow arena after refocus"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user