From d338a803941c2b0ac83decfcdfac33c09dfaa971 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 16 Jun 2021 17:37:23 +0200 Subject: Start refactoring ide_completion tests --- crates/ide_completion/src/completions/pattern.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ide_completion/src/completions/pattern.rs') diff --git a/crates/ide_completion/src/completions/pattern.rs b/crates/ide_completion/src/completions/pattern.rs index 1daa8595a..e45b2a1ea 100644 --- a/crates/ide_completion/src/completions/pattern.rs +++ b/crates/ide_completion/src/completions/pattern.rs @@ -13,7 +13,7 @@ pub(crate) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) { if let Some(hir::Adt::Enum(e)) = ctx.expected_type.as_ref().and_then(|ty| ty.strip_references().as_adt()) { - super::complete_enum_variants(acc, ctx, e, |acc, ctx, variant, path| { + super::enum_variants_with_paths(acc, ctx, e, |acc, ctx, variant, path| { acc.add_qualified_variant_pat(ctx, variant, path.clone()); acc.add_qualified_enum_variant(ctx, variant, path); }); -- cgit v1.2.3 From aa644b55859c6b5c6695a5d4fb35d1b6efbbebcc Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 16 Jun 2021 21:45:02 +0200 Subject: Move test_utils into tests module --- crates/ide_completion/src/completions/pattern.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_completion/src/completions/pattern.rs') diff --git a/crates/ide_completion/src/completions/pattern.rs b/crates/ide_completion/src/completions/pattern.rs index e45b2a1ea..efe3c957a 100644 --- a/crates/ide_completion/src/completions/pattern.rs +++ b/crates/ide_completion/src/completions/pattern.rs @@ -61,17 +61,17 @@ mod tests { use expect_test::{expect, Expect}; use crate::{ - test_utils::{check_edit, completion_list}, + tests::{check_edit, filtered_completion_list}, CompletionKind, }; fn check(ra_fixture: &str, expect: Expect) { - let actual = completion_list(ra_fixture, CompletionKind::Reference); + let actual = filtered_completion_list(ra_fixture, CompletionKind::Reference); expect.assert_eq(&actual) } fn check_snippet(ra_fixture: &str, expect: Expect) { - let actual = completion_list(ra_fixture, CompletionKind::Snippet); + let actual = filtered_completion_list(ra_fixture, CompletionKind::Snippet); expect.assert_eq(&actual) } -- cgit v1.2.3