fix tests

This commit is contained in:
Blaž Hrastnik 2022-11-08 22:20:32 +09:00
parent cd8bbbc044
commit bb303cf41d
No known key found for this signature in database
GPG key ID: 1238B9C4AD889640

View file

@ -704,7 +704,10 @@ mod test {
#[test]
fn optimized_composition() {
let mut state = State::new("".into());
let mut state = State {
doc: "".into(),
selection: Selection::point(0),
};
let t1 = Transaction::insert(&state.doc, &state.selection, Tendril::from("h"));
t1.apply(&mut state.doc);
state.selection = state.selection.clone().map(t1.changes());