add a test

This commit is contained in:
Jake Heinz 2021-11-29 10:36:22 +00:00
parent 97105e1288
commit f0bfe310a2
4 changed files with 523 additions and 3 deletions

View file

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