aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/typing
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-24 10:29:43 +0100
committerAleksey Kladov <[email protected]>2020-06-24 10:29:43 +0100
commitc6795fb83a850dde6ac0b08decf108c0c3aa452a (patch)
tree6f5ae66dc754b6e20069bdcbccf70fa42b236b57 /crates/ra_ide/src/typing
parente9cb818c2683e06153f013c3b8d03f7f2719eb02 (diff)
More consistent usage of fixtures
Diffstat (limited to 'crates/ra_ide/src/typing')
-rw-r--r--crates/ra_ide/src/typing/on_enter.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs
index 787e85ffd..50adae8bb 100644
--- a/crates/ra_ide/src/typing/on_enter.rs
+++ b/crates/ra_ide/src/typing/on_enter.rs
@@ -78,6 +78,7 @@ mod tests {
78 use test_utils::assert_eq_text; 78 use test_utils::assert_eq_text;
79 79
80 use crate::mock_analysis::single_file_with_position; 80 use crate::mock_analysis::single_file_with_position;
81 use stdx::trim_indent;
81 82
82 fn apply_on_enter(before: &str) -> Option<String> { 83 fn apply_on_enter(before: &str) -> Option<String> {
83 let (analysis, position) = single_file_with_position(&before); 84 let (analysis, position) = single_file_with_position(&before);
@@ -89,6 +90,7 @@ mod tests {
89 } 90 }
90 91
91 fn do_check(ra_fixture_before: &str, ra_fixture_after: &str) { 92 fn do_check(ra_fixture_before: &str, ra_fixture_after: &str) {
93 let ra_fixture_after = &trim_indent(ra_fixture_after);
92 let actual = apply_on_enter(ra_fixture_before).unwrap(); 94 let actual = apply_on_enter(ra_fixture_before).unwrap();
93 assert_eq_text!(ra_fixture_after, &actual); 95 assert_eq_text!(ra_fixture_after, &actual);
94 } 96 }