From 1c61326ca04b284a964dd581749a563cbbd71273 Mon Sep 17 00:00:00 2001 From: Young-Flash Date: Thu, 18 Jan 2024 17:35:01 +0800 Subject: [PATCH] add use_tree_completion test --- crates/ide-completion/src/tests/use_tree.rs | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/crates/ide-completion/src/tests/use_tree.rs b/crates/ide-completion/src/tests/use_tree.rs index 167bdec546..f8b76571ca 100644 --- a/crates/ide-completion/src/tests/use_tree.rs +++ b/crates/ide-completion/src/tests/use_tree.rs @@ -8,6 +8,33 @@ fn check(ra_fixture: &str, expect: Expect) { expect.assert_eq(&actual) } +#[test] +fn use_tree_completion() { + check( + r#" +struct implThing; + +use crate::{impl$0}; +"#, + expect![[r#" + st implThing implThing + kw self + "#]], + ); + + check( + r#" +struct implThing; + +use crate::{impl$0; +"#, + expect![[r#" + st implThing implThing + kw self + "#]], + ); +} + #[test] fn use_tree_start() { cov_mark::check!(unqualified_path_selected_only);