aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-16 14:44:24 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-16 14:44:24 +0100
commit1216878f7be20dd0e652fb8cdc395009fdcfae07 (patch)
tree6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_syntax/tests
parent39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff)
parent61f3a438d3a729a6be941bca1ff4c6a97a33f221 (diff)
Merge #134
134: Cargo Format run r=kjeremy a=kjeremy I'm not sure how appreciated this is but I figured I would run `cargo fmt` and see what came up. I made sure that `cargo test` still passes. Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r--crates/ra_syntax/tests/test.rs9
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;
4extern crate walkdir; 4extern crate walkdir;
5 5
6use std::{ 6use std::{
7 fmt::Write,
7 fs, 8 fs,
8 path::{Path, PathBuf}, 9 path::{Path, PathBuf},
9 fmt::Write,
10}; 10};
11 11
12use ra_syntax::{ 12use 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
56pub fn dir_tests<F>(paths: &[&str], f: F) 55pub fn dir_tests<F>(paths: &[&str], f: F)
57 where 56where
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);