mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Cleanup tests
This commit is contained in:
parent
2dc67c85b9
commit
2ac20b05f1
3 changed files with 53 additions and 55 deletions
|
@ -136,17 +136,7 @@ mod tests {
|
|||
use crate::fixture;
|
||||
|
||||
fn check(ra_fixture: &str) {
|
||||
let (analysis, position, mut annotations) = fixture::annotations(ra_fixture);
|
||||
let (mut expected, data) = annotations.pop().unwrap();
|
||||
match data.as_str() {
|
||||
"" => (),
|
||||
"file" => {
|
||||
expected.range =
|
||||
TextRange::up_to(TextSize::of(&*analysis.file_text(expected.file_id).unwrap()))
|
||||
}
|
||||
data => panic!("bad data: {}", data),
|
||||
}
|
||||
|
||||
let (analysis, position, expected) = fixture::nav_target_annotation(ra_fixture);
|
||||
let mut navs =
|
||||
analysis.goto_definition(position).unwrap().expect("no definition found").info;
|
||||
if navs.len() == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue