diff options
author | Florian Diebold <[email protected]> | 2019-12-30 12:53:43 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2020-01-11 22:33:04 +0000 |
commit | 877fda04c5a37241b09f155847d7e27b20875b63 (patch) | |
tree | 9bbc5ae90902cdabd8ea04e83b086ae0756bcc11 /crates/ra_assists | |
parent | 2e09a96f82d4ba15de2c8b8fbbe40fd78e21c185 (diff) |
Add test
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/assists/add_missing_impl_members.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/ra_assists/src/assists/add_missing_impl_members.rs b/crates/ra_assists/src/assists/add_missing_impl_members.rs index bc49e71fe..f0dfe7780 100644 --- a/crates/ra_assists/src/assists/add_missing_impl_members.rs +++ b/crates/ra_assists/src/assists/add_missing_impl_members.rs | |||
@@ -401,6 +401,29 @@ impl Foo for S { | |||
401 | } | 401 | } |
402 | 402 | ||
403 | #[test] | 403 | #[test] |
404 | fn test_qualify_path_1() { | ||
405 | check_assist( | ||
406 | add_missing_impl_members, | ||
407 | " | ||
408 | mod foo { | ||
409 | struct Bar; | ||
410 | trait Foo { fn foo(&self, bar: Bar); } | ||
411 | } | ||
412 | struct S; | ||
413 | impl foo::Foo for S { <|> }", | ||
414 | " | ||
415 | mod foo { | ||
416 | struct Bar; | ||
417 | trait Foo { fn foo(&self, bar: Bar); } | ||
418 | } | ||
419 | struct S; | ||
420 | impl foo::Foo for S { | ||
421 | <|>fn foo(&self, bar: foo::Bar) { unimplemented!() } | ||
422 | }", | ||
423 | ); | ||
424 | } | ||
425 | |||
426 | #[test] | ||
404 | fn test_empty_trait() { | 427 | fn test_empty_trait() { |
405 | check_assist_not_applicable( | 428 | check_assist_not_applicable( |
406 | add_missing_impl_members, | 429 | add_missing_impl_members, |