Fix editor tests

This commit is contained in:
Nathan Sobo 2022-05-24 19:58:41 -06:00 committed by Antonio Scandurra
parent 5b7825d5de
commit 6b96822c1a

View file

@ -1528,7 +1528,7 @@ mod tests {
let layouts = editor.update(cx, |editor, cx| {
let snapshot = editor.snapshot(cx);
let mut presenter = cx.build_presenter(window_id, 30.);
let mut layout_cx = presenter.build_layout_context(false, cx);
let mut layout_cx = presenter.build_layout_context(Vector2F::zero(), false, cx);
element.layout_line_numbers(0..6, &Default::default(), &snapshot, &mut layout_cx)
});
assert_eq!(layouts.len(), 6);
@ -1566,7 +1566,7 @@ mod tests {
let mut scene = Scene::new(1.0);
let mut presenter = cx.build_presenter(window_id, 30.);
let mut layout_cx = presenter.build_layout_context(false, cx);
let mut layout_cx = presenter.build_layout_context(Vector2F::zero(), false, cx);
let (size, mut state) = element.layout(
SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)),
&mut layout_cx,