mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
Add test on hover
This commit is contained in:
parent
759bcea96d
commit
8c159b54e9
1 changed files with 19 additions and 0 deletions
|
@ -832,6 +832,25 @@ fn func(foo: i32) { if true { <|>foo; }; }
|
|||
assert_eq!(hover_on, "\"Tracks\"");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hover_through_assert_macro() {
|
||||
let hover_on = check_hover_result(
|
||||
r#"
|
||||
//- /lib.rs
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! assert {}
|
||||
|
||||
fn bar() -> bool { true }
|
||||
fn foo() {
|
||||
assert!(ba<|>r());
|
||||
}
|
||||
"#,
|
||||
&["fn bar() -> bool"],
|
||||
);
|
||||
|
||||
assert_eq!(hover_on, "bar");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hover_through_literal_string_in_builtin_macro() {
|
||||
check_hover_no_result(
|
||||
|
|
Loading…
Reference in a new issue