mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Fix editor tests
This commit is contained in:
parent
5b7825d5de
commit
6b96822c1a
1 changed files with 2 additions and 2 deletions
|
@ -1528,7 +1528,7 @@ mod tests {
|
||||||
let layouts = editor.update(cx, |editor, cx| {
|
let layouts = editor.update(cx, |editor, cx| {
|
||||||
let snapshot = editor.snapshot(cx);
|
let snapshot = editor.snapshot(cx);
|
||||||
let mut presenter = cx.build_presenter(window_id, 30.);
|
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)
|
element.layout_line_numbers(0..6, &Default::default(), &snapshot, &mut layout_cx)
|
||||||
});
|
});
|
||||||
assert_eq!(layouts.len(), 6);
|
assert_eq!(layouts.len(), 6);
|
||||||
|
@ -1566,7 +1566,7 @@ mod tests {
|
||||||
|
|
||||||
let mut scene = Scene::new(1.0);
|
let mut scene = Scene::new(1.0);
|
||||||
let mut presenter = cx.build_presenter(window_id, 30.);
|
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(
|
let (size, mut state) = element.layout(
|
||||||
SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)),
|
SizeConstraint::new(vec2f(500., 500.), vec2f(500., 500.)),
|
||||||
&mut layout_cx,
|
&mut layout_cx,
|
||||||
|
|
Loading…
Reference in a new issue