mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
internal: Move out WithFixture
into dev-dep only crate
This commit is contained in:
parent
ec6162308e
commit
f49a2fed3f
59 changed files with 189 additions and 119 deletions
|
@ -1,5 +1,5 @@
|
|||
//! Utilities for creating `Analysis` instances for tests.
|
||||
use ide_db::fixture::ChangeFixture;
|
||||
use test_fixture::ChangeFixture;
|
||||
use test_utils::{extract_annotations, RangeOrOffset};
|
||||
|
||||
use crate::{Analysis, AnalysisHost, FileId, FilePosition, FileRange};
|
||||
|
|
|
@ -646,8 +646,9 @@ mod tests {
|
|||
use std::iter;
|
||||
|
||||
use expect_test::{expect, Expect};
|
||||
use ide_db::{base_db::FilePosition, fixture::ChangeFixture};
|
||||
use ide_db::base_db::FilePosition;
|
||||
use stdx::format_to;
|
||||
use test_fixture::ChangeFixture;
|
||||
|
||||
use crate::RootDatabase;
|
||||
|
||||
|
|
|
@ -60,10 +60,10 @@ mod tests {
|
|||
use ide_assists::{Assist, AssistResolveStrategy};
|
||||
use ide_db::{
|
||||
base_db::{salsa::Durability, FileRange},
|
||||
fixture::WithFixture,
|
||||
symbol_index::SymbolsDatabase,
|
||||
FxHashSet, RootDatabase,
|
||||
};
|
||||
use test_fixture::WithFixture;
|
||||
use triomphe::Arc;
|
||||
|
||||
use super::ssr_assists;
|
||||
|
@ -71,7 +71,7 @@ mod tests {
|
|||
fn get_assists(ra_fixture: &str, resolve: AssistResolveStrategy) -> Vec<Assist> {
|
||||
let (mut db, file_id, range_or_offset) = RootDatabase::with_range_or_offset(ra_fixture);
|
||||
let mut local_roots = FxHashSet::default();
|
||||
local_roots.insert(ide_db::fixture::WORKSPACE);
|
||||
local_roots.insert(test_fixture::WORKSPACE);
|
||||
db.set_local_roots_with_durability(Arc::new(local_roots), Durability::HIGH);
|
||||
ssr_assists(&db, &resolve, FileRange { file_id, range: range_or_offset.into() })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue