Fixed typos in tests

This commit is contained in:
Vincent Esche 2021-01-08 15:41:08 +01:00
parent 6cd93db8a5
commit 4702c01553
3 changed files with 6 additions and 6 deletions

View file

@ -1967,7 +1967,7 @@ fn test_no_space_after_semi_colon() {
#[test] #[test]
fn test_rustc_issue_57597() { fn test_rustc_issue_57597() {
fn test_error(fixture: &str) { fn test_error(fixture: &str) {
assert_eq!(parse_macro_error(fixture), ParseError::RepetitionEmtpyTokenTree); assert_eq!(parse_macro_error(fixture), ParseError::RepetitionEmptyTokenTree);
} }
test_error("macro_rules! foo { ($($($i:ident)?)+) => {}; }"); test_error("macro_rules! foo { ($($($i:ident)?)+) => {}; }");

View file

@ -290,7 +290,7 @@ mod tests {
Some(vec![disjoint_edit.clone(), joint_edit.clone()]); Some(vec![disjoint_edit.clone(), joint_edit.clone()]);
assert!( assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]), !all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits" "Completion with disjoint edits fails the validation even with empty extra edits"
); );
completion_with_joint_edits.text_edit = completion_with_joint_edits.text_edit =
@ -298,7 +298,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit.clone()]); completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit.clone()]);
assert!( assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]), !all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits" "Completion with disjoint edits fails the validation even with empty extra edits"
); );
completion_with_joint_edits.text_edit = completion_with_joint_edits.text_edit =
@ -310,7 +310,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = None; completion_with_joint_edits.additional_text_edits = None;
assert!( assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]), !all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits" "Completion with disjoint edits fails the validation even with empty extra edits"
); );
completion_with_joint_edits.text_edit = completion_with_joint_edits.text_edit =
@ -322,7 +322,7 @@ mod tests {
completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit]); completion_with_joint_edits.additional_text_edits = Some(vec![joint_edit]);
assert!( assert!(
!all_edits_are_disjoint(&completion_with_joint_edits, &[]), !all_edits_are_disjoint(&completion_with_joint_edits, &[]),
"Completion with disjoint edits fails the validaton even with empty extra edits" "Completion with disjoint edits fails the validation even with empty extra edits"
); );
} }

View file

@ -106,7 +106,7 @@ mod tests {
#[test] #[test]
fn test_format_docs_preserves_newlines() { fn test_format_docs_preserves_newlines() {
let comment = "this\nis\nultiline"; let comment = "this\nis\nmultiline";
assert_eq!(format_docs(comment), comment); assert_eq!(format_docs(comment), comment);
} }