Modernize qual path completion tests
This commit is contained in:
parent
824a24c710
commit
c14a3b4a20
@ -2,6 +2,9 @@
|
||||
mod completion_item;
|
||||
mod completion_context;
|
||||
mod presentation;
|
||||
mod patterns;
|
||||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
|
||||
mod complete_attribute;
|
||||
mod complete_dot;
|
||||
@ -15,9 +18,6 @@
|
||||
mod complete_postfix;
|
||||
mod complete_macro_in_item_position;
|
||||
mod complete_trait_impl;
|
||||
mod patterns;
|
||||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
|
||||
use ra_ide_db::RootDatabase;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -683,6 +683,57 @@ fn bar(self) { self.<|> }
|
||||
},
|
||||
]
|
||||
"#]],
|
||||
);
|
||||
|
||||
check(
|
||||
r#"
|
||||
use self::my<|>;
|
||||
|
||||
/// mod docs
|
||||
mod my { }
|
||||
|
||||
/// enum docs
|
||||
enum E {
|
||||
/// variant docs
|
||||
V
|
||||
}
|
||||
use self::E::*;
|
||||
"#,
|
||||
expect![[r#"
|
||||
[
|
||||
CompletionItem {
|
||||
label: "E",
|
||||
source_range: 10..12,
|
||||
delete: 10..12,
|
||||
insert: "E",
|
||||
kind: Enum,
|
||||
documentation: Documentation(
|
||||
"enum docs",
|
||||
),
|
||||
},
|
||||
CompletionItem {
|
||||
label: "V",
|
||||
source_range: 10..12,
|
||||
delete: 10..12,
|
||||
insert: "V",
|
||||
kind: EnumVariant,
|
||||
detail: "()",
|
||||
documentation: Documentation(
|
||||
"variant docs",
|
||||
),
|
||||
},
|
||||
CompletionItem {
|
||||
label: "my",
|
||||
source_range: 10..12,
|
||||
delete: 10..12,
|
||||
insert: "my",
|
||||
kind: Module,
|
||||
documentation: Documentation(
|
||||
"mod docs",
|
||||
),
|
||||
},
|
||||
]
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user