Skip to content

Commit 8c159b5

Browse files
committed
Add test on hover
1 parent 759bcea commit 8c159b5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

crates/ra_ide/src/hover.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,25 @@ fn func(foo: i32) { if true { <|>foo; }; }
832832
assert_eq!(hover_on, "\"Tracks\"");
833833
}
834834

835+
#[test]
836+
fn test_hover_through_assert_macro() {
837+
let hover_on = check_hover_result(
838+
r#"
839+
//- /lib.rs
840+
#[rustc_builtin_macro]
841+
macro_rules! assert {}
842+
843+
fn bar() -> bool { true }
844+
fn foo() {
845+
assert!(ba<|>r());
846+
}
847+
"#,
848+
&["fn bar() -> bool"],
849+
);
850+
851+
assert_eq!(hover_on, "bar");
852+
}
853+
835854
#[test]
836855
fn test_hover_through_literal_string_in_builtin_macro() {
837856
check_hover_no_result(

0 commit comments

Comments
 (0)