mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 00:39:51 +00:00
Fix test assertions
This commit is contained in:
parent
9d7039ed51
commit
1803bd77ef
1 changed files with 8 additions and 2 deletions
|
@ -589,7 +589,10 @@ mod tests {
|
|||
editor.update(&mut cx, |editor, cx| {
|
||||
assert!(!editor.is_dirty(cx.as_ref()));
|
||||
assert_eq!(editor.title(cx.as_ref()), "untitled");
|
||||
assert!(editor.language(cx).is_none());
|
||||
assert!(Arc::ptr_eq(
|
||||
editor.language(cx).unwrap(),
|
||||
&language::PLAIN_TEXT
|
||||
));
|
||||
editor.handle_input(&editor::Input("hi".into()), cx);
|
||||
assert!(editor.is_dirty(cx.as_ref()));
|
||||
});
|
||||
|
@ -683,7 +686,10 @@ mod tests {
|
|||
});
|
||||
|
||||
editor.update(&mut cx, |editor, cx| {
|
||||
assert!(editor.language(cx).is_none());
|
||||
assert!(Arc::ptr_eq(
|
||||
editor.language(cx).unwrap(),
|
||||
&language::PLAIN_TEXT
|
||||
));
|
||||
editor.handle_input(&editor::Input("hi".into()), cx);
|
||||
assert!(editor.is_dirty(cx.as_ref()));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue