diff options
author | Aleksey Kladov <[email protected]> | 2020-07-04 09:36:12 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-04 09:41:50 +0100 |
commit | f2f6a46aa4751393ae18e8b21aa631c9919c5f43 (patch) | |
tree | 6c0d0cbde03a3f593256d76e7ab3784349868a3b /crates/ra_ide/src/completion/complete_qualified_path.rs | |
parent | caeddff5435d9cf604aac7af7b53cc4ac8bb4a13 (diff) |
Cleanup dot completiont tests
Diffstat (limited to 'crates/ra_ide/src/completion/complete_qualified_path.rs')
-rw-r--r-- | crates/ra_ide/src/completion/complete_qualified_path.rs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_qualified_path.rs b/crates/ra_ide/src/completion/complete_qualified_path.rs index f133ce3ce..a16866cd2 100644 --- a/crates/ra_ide/src/completion/complete_qualified_path.rs +++ b/crates/ra_ide/src/completion/complete_qualified_path.rs | |||
@@ -1206,6 +1206,45 @@ mod tests { | |||
1206 | } | 1206 | } |
1207 | 1207 | ||
1208 | #[test] | 1208 | #[test] |
1209 | fn test_super_super_completion() { | ||
1210 | assert_debug_snapshot!( | ||
1211 | do_reference_completion( | ||
1212 | r" | ||
1213 | mod a { | ||
1214 | const A: usize = 0; | ||
1215 | |||
1216 | mod b { | ||
1217 | const B: usize = 0; | ||
1218 | |||
1219 | mod c { | ||
1220 | use super::super::<|> | ||
1221 | } | ||
1222 | } | ||
1223 | } | ||
1224 | ", | ||
1225 | ), | ||
1226 | @r###" | ||
1227 | [ | ||
1228 | CompletionItem { | ||
1229 | label: "A", | ||
1230 | source_range: 120..120, | ||
1231 | delete: 120..120, | ||
1232 | insert: "A", | ||
1233 | kind: Const, | ||
1234 | }, | ||
1235 | CompletionItem { | ||
1236 | label: "b", | ||
1237 | source_range: 120..120, | ||
1238 | delete: 120..120, | ||
1239 | insert: "b", | ||
1240 | kind: Module, | ||
1241 | }, | ||
1242 | ] | ||
1243 | "### | ||
1244 | ); | ||
1245 | } | ||
1246 | |||
1247 | #[test] | ||
1209 | fn completes_reexported_items_under_correct_name() { | 1248 | fn completes_reexported_items_under_correct_name() { |
1210 | assert_debug_snapshot!( | 1249 | assert_debug_snapshot!( |
1211 | do_reference_completion( | 1250 | do_reference_completion( |