mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
add a test
This commit is contained in:
parent
97105e1288
commit
f0bfe310a2
4 changed files with 523 additions and 3 deletions
|
@ -18,8 +18,8 @@ use crate::{
|
|||
pub const WORKSPACE: SourceRootId = SourceRootId(0);
|
||||
|
||||
pub trait WithFixture: Default + SourceDatabaseExt + 'static {
|
||||
fn with_single_file(text: &str) -> (Self, FileId) {
|
||||
let fixture = ChangeFixture::parse(text);
|
||||
fn with_single_file(ra_fixture: &str) -> (Self, FileId) {
|
||||
let fixture = ChangeFixture::parse(ra_fixture);
|
||||
let mut db = Self::default();
|
||||
fixture.change.apply(&mut db);
|
||||
assert_eq!(fixture.files.len(), 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue