mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Replace only occurence of check_expect with check_diagnostics
This commit is contained in:
parent
7f75815ca2
commit
03b1ecd90d
2 changed files with 6 additions and 108 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue