Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/imports/insert_use/tests.rs')
-rw-r--r--crates/ide-db/src/imports/insert_use/tests.rs32
1 files changed, 24 insertions, 8 deletions
diff --git a/crates/ide-db/src/imports/insert_use/tests.rs b/crates/ide-db/src/imports/insert_use/tests.rs
index 3e3aa266f7..decb0ea9d8 100644
--- a/crates/ide-db/src/imports/insert_use/tests.rs
+++ b/crates/ide-db/src/imports/insert_use/tests.rs
@@ -1244,8 +1244,8 @@ use ::ext::foo::Foo;
fn check_with_config(
path: &str,
- ra_fixture_before: &str,
- ra_fixture_after: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
config: &InsertUseConfig,
) {
let (db, file_id, pos) = if ra_fixture_before.contains(CURSOR_MARKER) {
@@ -1277,8 +1277,8 @@ fn check_with_config(
fn check(
path: &str,
- ra_fixture_before: &str,
- ra_fixture_after: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
granularity: ImportGranularity,
) {
check_with_config(
@@ -1295,19 +1295,35 @@ fn check(
)
}
-fn check_crate(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
+fn check_crate(
+ path: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
+) {
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Crate)
}
-fn check_module(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
+fn check_module(
+ path: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
+) {
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Module)
}
-fn check_none(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
+fn check_none(
+ path: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
+) {
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::Item)
}
-fn check_one(path: &str, ra_fixture_before: &str, ra_fixture_after: &str) {
+fn check_one(
+ path: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_before: &str,
+ #[rust_analyzer::rust_fixture] ra_fixture_after: &str,
+) {
check(path, ra_fixture_before, ra_fixture_after, ImportGranularity::One)
}