From 5ddfde3038749a06b0fae3a4d96d002148f9126a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 9 Feb 2021 17:23:35 +0300 Subject: Modernize tests --- crates/ide/src/syntax_tree.rs | 366 +++++++++++++++++++----------------------- 1 file changed, 169 insertions(+), 197 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/syntax_tree.rs b/crates/ide/src/syntax_tree.rs index 4c63d3023..f979ba434 100644 --- a/crates/ide/src/syntax_tree.rs +++ b/crates/ide/src/syntax_tree.rs @@ -100,147 +100,137 @@ fn syntax_tree_for_token(node: &SyntaxToken, text_range: TextRange) -> Option Date: Tue, 9 Feb 2021 17:48:25 +0300 Subject: Cleanup test --- crates/ide/src/join_lines.rs | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'crates/ide') diff --git a/crates/ide/src/join_lines.rs b/crates/ide/src/join_lines.rs index 631bde0f1..e3f3985d1 100644 --- a/crates/ide/src/join_lines.rs +++ b/crates/ide/src/join_lines.rs @@ -270,27 +270,28 @@ fn foo() { #[test] fn test_join_lines_diverging_block() { - let before = r" - fn foo() { - loop { - match x { - 92 => $0{ - continue; - } - } - } - } - "; - let after = r" - fn foo() { - loop { - match x { - 92 => $0continue, - } - } + check_join_lines( + r" +fn foo() { + loop { + match x { + 92 => $0{ + continue; } - "; - check_join_lines(before, after); + } + } +} + ", + r" +fn foo() { + loop { + match x { + 92 => $0continue, + } + } +} + ", + ); } #[test] -- cgit v1.2.3