Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/completions/extern_abi.rs')
| -rw-r--r-- | crates/ide-completion/src/completions/extern_abi.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crates/ide-completion/src/completions/extern_abi.rs b/crates/ide-completion/src/completions/extern_abi.rs index bcfda928c4..7c2cc2a6c1 100644 --- a/crates/ide-completion/src/completions/extern_abi.rs +++ b/crates/ide-completion/src/completions/extern_abi.rs @@ -65,18 +65,13 @@ pub(crate) fn complete_extern_abi( #[cfg(test)] mod tests { - use expect_test::{expect, Expect}; + use expect_test::expect; - use crate::tests::{check_edit, completion_list_no_kw}; - - fn check(ra_fixture: &str, expect: Expect) { - let actual = completion_list_no_kw(ra_fixture); - expect.assert_eq(&actual); - } + use crate::tests::{check_edit, check_no_kw}; #[test] fn only_completes_in_string_literals() { - check( + check_no_kw( r#" $0 fn foo {} "#, @@ -86,7 +81,7 @@ $0 fn foo {} #[test] fn requires_extern_prefix() { - check( + check_no_kw( r#" "$0" fn foo {} "#, @@ -96,7 +91,7 @@ $0 fn foo {} #[test] fn works() { - check( + check_no_kw( r#" extern "$0" fn foo {} "#, |