remove one more dependency on source roots

This commit is contained in:
Aleksey Kladov 2019-10-14 15:15:47 +03:00
parent 77f2dd96a1
commit 1555a1aa0d
3 changed files with 26 additions and 21 deletions

View file

@ -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);
}