Add test on hover

This commit is contained in:
Edwin Cheng 2020-03-11 23:14:15 +08:00
parent 759bcea96d
commit 8c159b54e9

View file

@ -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(