Skip to content

Commit d688215

Browse files
committed
Update tests to accept new hover formatting
1 parent 910ac5a commit d688215

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

crates/ra_ide/src/hover.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ mod tests {
405405
};
406406
}
407407
"#,
408-
&["Foo\nfield_a: u32"],
408+
&["Foo\n___\n\n```rust\nfield_a: u32"],
409409
);
410410

411411
// Hovering over the field in the definition
@@ -422,7 +422,7 @@ mod tests {
422422
};
423423
}
424424
"#,
425-
&["Foo\nfield_a: u32"],
425+
&["Foo\n___\n\n```rust\nfield_a: u32"],
426426
);
427427
}
428428

@@ -475,7 +475,7 @@ fn main() {
475475
",
476476
);
477477
let hover = analysis.hover(position).unwrap().unwrap();
478-
assert_eq!(trim_markup_opt(hover.info.first()), Some("Option\nSome"));
478+
assert_eq!(trim_markup_opt(hover.info.first()), Some("Option\n___\n\n```rust\nSome"));
479479

480480
let (analysis, position) = single_file_with_position(
481481
"
@@ -503,6 +503,9 @@ fn main() {
503503
"#,
504504
&["
505505
Option
506+
___
507+
508+
```rust
506509
None
507510
```
508511
@@ -524,6 +527,9 @@ The None variant
524527
"#,
525528
&["
526529
Option
530+
___
531+
532+
```rust
527533
Some
528534
```
529535
@@ -606,7 +612,10 @@ fn func(foo: i32) { if true { <|>foo; }; }
606612
",
607613
);
608614
let hover = analysis.hover(position).unwrap().unwrap();
609-
assert_eq!(trim_markup_opt(hover.info.first()), Some("wrapper::Thing\nfn new() -> Thing"));
615+
assert_eq!(
616+
trim_markup_opt(hover.info.first()),
617+
Some("wrapper::Thing\n___\n\n```rust\nfn new() -> Thing")
618+
);
610619
}
611620

612621
#[test]

0 commit comments

Comments
 (0)