From 877fda04c5a37241b09f155847d7e27b20875b63 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Mon, 30 Dec 2019 13:53:43 +0100 Subject: Add test --- .../src/assists/add_missing_impl_members.rs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'crates/ra_assists/src/assists/add_missing_impl_members.rs') 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 @@ -400,6 +400,29 @@ impl Foo for S { ) } + #[test] + fn test_qualify_path_1() { + check_assist( + add_missing_impl_members, + " +mod foo { + struct Bar; + trait Foo { fn foo(&self, bar: Bar); } +} +struct S; +impl foo::Foo for S { <|> }", + " +mod foo { + struct Bar; + trait Foo { fn foo(&self, bar: Bar); } +} +struct S; +impl foo::Foo for S { + <|>fn foo(&self, bar: foo::Bar) { unimplemented!() } +}", + ); + } + #[test] fn test_empty_trait() { check_assist_not_applicable( -- cgit v1.2.3