mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
remove one more dependency on source roots
This commit is contained in:
parent
77f2dd96a1
commit
1555a1aa0d
3 changed files with 26 additions and 21 deletions
|
@ -141,14 +141,8 @@ mod tests {
|
|||
#[test]
|
||||
fn test_loading_rust_analyzer() {
|
||||
let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap();
|
||||
let (host, roots) = load_cargo(path).unwrap();
|
||||
let mut n_crates = 0;
|
||||
for (root, _) in roots {
|
||||
for _krate in Crate::source_root_crates(host.raw_database(), root) {
|
||||
n_crates += 1;
|
||||
}
|
||||
}
|
||||
|
||||
let (host, _roots) = load_cargo(path).unwrap();
|
||||
let n_crates = Crate::all(host.raw_database()).len();
|
||||
// RA has quite a few crates, but the exact count doesn't matter
|
||||
assert!(n_crates > 20);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue