Replace only occurence of check_expect with check_diagnostics

This commit is contained in:
Johann Hemmann 2024-01-04 18:20:38 +01:00
parent 7f75815ca2
commit 03b1ecd90d
2 changed files with 6 additions and 108 deletions

View file

@ -1,7 +1,6 @@
#[cfg(not(feature = "in-rust-tree"))]
mod sourcegen;
use expect_test::Expect;
use ide_db::{
assists::AssistResolveStrategy, base_db::SourceDatabaseExt, LineIndexDatabase, RootDatabase,
};
@ -82,17 +81,6 @@ pub(crate) fn check_no_fix(ra_fixture: &str) {
assert!(diagnostic.fixes.is_none(), "got a fix when none was expected: {diagnostic:?}");
}
pub(crate) fn check_expect(ra_fixture: &str, expect: Expect) {
let (db, file_id) = RootDatabase::with_single_file(ra_fixture);
let diagnostics = super::diagnostics(
&db,
&DiagnosticsConfig::test_sample(),
&AssistResolveStrategy::All,
file_id,
);
expect.assert_debug_eq(&diagnostics)
}
#[track_caller]
pub(crate) fn check_diagnostics(ra_fixture: &str) {
let mut config = DiagnosticsConfig::test_sample();