From cbe93359545611a34bb1a6a8e99ff4621deb1197 Mon Sep 17 00:00:00 2001 From: unexge Date: Fri, 15 Jan 2021 22:57:10 +0300 Subject: Add test mark for skipping single use item --- crates/assists/src/handlers/unmerge_use.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/assists/src/handlers') diff --git a/crates/assists/src/handlers/unmerge_use.rs b/crates/assists/src/handlers/unmerge_use.rs index 6da1795da..3dbef8e51 100644 --- a/crates/assists/src/handlers/unmerge_use.rs +++ b/crates/assists/src/handlers/unmerge_use.rs @@ -3,6 +3,7 @@ use syntax::{ ast::{self, edit::AstNodeEdit, VisibilityOwner}, AstNode, SyntaxKind, }; +use test_utils::mark; use crate::{ assist_context::{AssistContext, Assists}, @@ -26,6 +27,7 @@ pub(crate) fn unmerge_use(acc: &mut Assists, ctx: &AssistContext) -> Option<()> let tree_list = tree.syntax().parent().and_then(ast::UseTreeList::cast)?; if tree_list.use_trees().count() < 2 { + mark::hit!(skip_single_use_item); return None; } @@ -87,6 +89,7 @@ mod tests { #[test] fn skip_single_use_item() { + mark::check!(skip_single_use_item); check_assist_not_applicable( unmerge_use, r" -- cgit v1.2.3