mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
More consistent usage of fixtures
This commit is contained in:
parent
e9cb818c26
commit
c6795fb83a
16 changed files with 1068 additions and 1059 deletions
|
@ -443,16 +443,16 @@ mod tests {
|
|||
#[test]
|
||||
fn hover_shows_type_of_an_expression() {
|
||||
let (analysis, position) = single_file_with_position(
|
||||
"
|
||||
pub fn foo() -> u32 { 1 }
|
||||
r#"
|
||||
pub fn foo() -> u32 { 1 }
|
||||
|
||||
fn main() {
|
||||
let foo_test = foo()<|>;
|
||||
}
|
||||
",
|
||||
fn main() {
|
||||
let foo_test = foo()<|>;
|
||||
}
|
||||
"#,
|
||||
);
|
||||
let hover = analysis.hover(position).unwrap().unwrap();
|
||||
assert_eq!(hover.range, TextRange::new(95.into(), 100.into()));
|
||||
assert_eq!(hover.range, TextRange::new(58.into(), 63.into()));
|
||||
assert_eq!(trim_markup_opt(hover.info.first()), Some("u32"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue