aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions/unqualified_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/completions/unqualified_path.rs')
-rw-r--r--crates/completion/src/completions/unqualified_path.rs18
1 files changed, 8 insertions, 10 deletions
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs
index 896f167ff..2da21b5c2 100644
--- a/crates/completion/src/completions/unqualified_path.rs
+++ b/crates/completion/src/completions/unqualified_path.rs
@@ -192,12 +192,14 @@ mod tests {
192 use test_utils::mark; 192 use test_utils::mark;
193 193
194 use crate::{ 194 use crate::{
195 test_utils::{check_edit, check_edit_with_config, completion_list_with_config}, 195 test_utils::{
196 check_edit, check_edit_with_config, completion_list_with_config, TEST_CONFIG,
197 },
196 CompletionConfig, CompletionKind, 198 CompletionConfig, CompletionKind,
197 }; 199 };
198 200
199 fn check(ra_fixture: &str, expect: Expect) { 201 fn check(ra_fixture: &str, expect: Expect) {
200 check_with_config(CompletionConfig::default(), ra_fixture, expect); 202 check_with_config(TEST_CONFIG, ra_fixture, expect);
201 } 203 }
202 204
203 fn check_with_config(config: CompletionConfig, ra_fixture: &str, expect: Expect) { 205 fn check_with_config(config: CompletionConfig, ra_fixture: &str, expect: Expect) {
@@ -205,10 +207,6 @@ mod tests {
205 expect.assert_eq(&actual) 207 expect.assert_eq(&actual)
206 } 208 }
207 209
208 fn fuzzy_completion_config() -> CompletionConfig {
209 CompletionConfig::default()
210 }
211
212 #[test] 210 #[test]
213 fn self_fulfilling_completion() { 211 fn self_fulfilling_completion() {
214 mark::check!(self_fulfilling_completion); 212 mark::check!(self_fulfilling_completion);
@@ -832,7 +830,7 @@ impl My<|>
832 #[test] 830 #[test]
833 fn function_fuzzy_completion() { 831 fn function_fuzzy_completion() {
834 check_edit_with_config( 832 check_edit_with_config(
835 fuzzy_completion_config(), 833 TEST_CONFIG,
836 "stdin", 834 "stdin",
837 r#" 835 r#"
838//- /lib.rs crate:dep 836//- /lib.rs crate:dep
@@ -858,7 +856,7 @@ fn main() {
858 #[test] 856 #[test]
859 fn macro_fuzzy_completion() { 857 fn macro_fuzzy_completion() {
860 check_edit_with_config( 858 check_edit_with_config(
861 fuzzy_completion_config(), 859 TEST_CONFIG,
862 "macro_with_curlies!", 860 "macro_with_curlies!",
863 r#" 861 r#"
864//- /lib.rs crate:dep 862//- /lib.rs crate:dep
@@ -886,7 +884,7 @@ fn main() {
886 #[test] 884 #[test]
887 fn struct_fuzzy_completion() { 885 fn struct_fuzzy_completion() {
888 check_edit_with_config( 886 check_edit_with_config(
889 fuzzy_completion_config(), 887 TEST_CONFIG,
890 "ThirdStruct", 888 "ThirdStruct",
891 r#" 889 r#"
892//- /lib.rs crate:dep 890//- /lib.rs crate:dep
@@ -917,7 +915,7 @@ fn main() {
917 fn fuzzy_completions_come_in_specific_order() { 915 fn fuzzy_completions_come_in_specific_order() {
918 mark::check!(certain_fuzzy_order_test); 916 mark::check!(certain_fuzzy_order_test);
919 check_with_config( 917 check_with_config(
920 fuzzy_completion_config(), 918 TEST_CONFIG,
921 r#" 919 r#"
922//- /lib.rs crate:dep 920//- /lib.rs crate:dep
923pub struct FirstStruct; 921pub struct FirstStruct;