Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ebresafegaga committed Dec 19, 2022
1 parent 126e491 commit ec3e6b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lsp/nls/src/requests/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,11 @@ mod tests {
priority: MergePriority::Neutral,
value: None,
};
let c = make_lin_item(
ItemId { file_id, index: 2 },
TermKind::Structure,
None,
);
let b = make_lin_item(
ItemId { file_id, index: 1 },
TermKind::Record(HashMap::from([
Expand All @@ -816,10 +821,11 @@ mod tests {
])),
Some(meta),
);
let lin = make_completed(vec![a, b]);
let lin = make_completed(vec![a, b, c]);

let actual = collect_record_info(&lin, id, &mut Vec::new());
let expected = vec![Ident::from("one"), Ident::from("two")];
let actual = actual.iter().map(|iwm| iwm.ident).collect::<Vec<_>>();
assert_eq!(actual, expected)
}
}

0 comments on commit ec3e6b8

Please sign in to comment.