diff options
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r-- | crates/ra_syntax/tests/test.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 27380efef..9d1ded093 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs | |||
@@ -4,14 +4,14 @@ extern crate test_utils; | |||
4 | extern crate walkdir; | 4 | extern crate walkdir; |
5 | 5 | ||
6 | use std::{ | 6 | use std::{ |
7 | fmt::Write, | ||
7 | fs, | 8 | fs, |
8 | path::{Path, PathBuf}, | 9 | path::{Path, PathBuf}, |
9 | fmt::Write, | ||
10 | }; | 10 | }; |
11 | 11 | ||
12 | use ra_syntax::{ | 12 | use ra_syntax::{ |
13 | utils::{check_fuzz_invariants, dump_tree}, | ||
13 | File, | 14 | File, |
14 | utils::{dump_tree, check_fuzz_invariants}, | ||
15 | }; | 15 | }; |
16 | 16 | ||
17 | #[test] | 17 | #[test] |
@@ -37,7 +37,6 @@ fn parser_fuzz_tests() { | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | |||
41 | /// Read file and normalize newlines. | 40 | /// Read file and normalize newlines. |
42 | /// | 41 | /// |
43 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: | 42 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: |
@@ -54,8 +53,8 @@ fn read_text(path: &Path) -> String { | |||
54 | } | 53 | } |
55 | 54 | ||
56 | pub fn dir_tests<F>(paths: &[&str], f: F) | 55 | pub fn dir_tests<F>(paths: &[&str], f: F) |
57 | where | 56 | where |
58 | F: Fn(&str) -> String, | 57 | F: Fn(&str) -> String, |
59 | { | 58 | { |
60 | for (path, input_code) in collect_tests(paths) { | 59 | for (path, input_code) in collect_tests(paths) { |
61 | let parse_tree = f(&input_code); | 60 | let parse_tree = f(&input_code); |