From 41d0f7f24ef924440ee710e134c01d6e47056c3f Mon Sep 17 00:00:00 2001 From: Yuki Kodama Date: Mon, 25 May 2020 00:14:56 +0900 Subject: Fix test to consider multiple underscores --- crates/ra_ide/src/completion/presentation.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs index 5708ff291..e59f730ff 100644 --- a/crates/ra_ide/src/completion/presentation.rs +++ b/crates/ra_ide/src/completion/presentation.rs @@ -672,7 +672,7 @@ mod tests { assert_debug_snapshot!( do_reference_completion( r" - fn with_ignored_args(_foo: i32, b_a_r_: bool) {} + fn with_ignored_args(_foo: i32, ___bar: bool, ho_ge_: String) {} fn main() { with_<|> } " ), @@ -680,8 +680,8 @@ mod tests { [ CompletionItem { label: "main()", - source_range: 94..99, - delete: 94..99, + source_range: 110..115, + delete: 110..115, insert: "main()$0", kind: Function, lookup: "main", @@ -689,12 +689,12 @@ mod tests { }, CompletionItem { label: "with_ignored_args(…)", - source_range: 94..99, - delete: 94..99, - insert: "with_ignored_args(${1:foo}, ${2:b_a_r_})$0", + source_range: 110..115, + delete: 110..115, + insert: "with_ignored_args(${1:foo}, ${2:bar}, ${3:ho_ge_})$0", kind: Function, lookup: "with_ignored_args", - detail: "fn with_ignored_args(_foo: i32, b_a_r_: bool)", + detail: "fn with_ignored_args(_foo: i32, ___bar: bool, ho_ge_: String)", trigger_call_info: true, }, ] -- cgit v1.2.3