diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-08 18:52:08 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-08 18:52:08 +0000 |
commit | 8b7e82b012c417ec40a896203ad79f20cf5530ef (patch) | |
tree | 85413766cc45708d77dfa9cb5a3a00767af8461a /crates/syntax | |
parent | 071dde1c1da10e3580bded99dc2d529074356536 (diff) | |
parent | d2bb2268d3a9cc0e2a6970c85c45724af5eb255c (diff) |
Merge #7918
7918: Generalize file ensuring infrastructure r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/src/tests.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/syntax/src/tests.rs b/crates/syntax/src/tests.rs index b2c06e24f..ba0ccfaed 100644 --- a/crates/syntax/src/tests.rs +++ b/crates/syntax/src/tests.rs | |||
@@ -7,7 +7,7 @@ use std::{ | |||
7 | use ast::NameOwner; | 7 | use ast::NameOwner; |
8 | use expect_test::expect_file; | 8 | use expect_test::expect_file; |
9 | use rayon::prelude::*; | 9 | use rayon::prelude::*; |
10 | use test_utils::{bench, bench_fixture, project_dir, skip_slow_tests}; | 10 | use test_utils::{bench, bench_fixture, project_root, skip_slow_tests}; |
11 | 11 | ||
12 | use crate::{ast, fuzz, tokenize, AstNode, SourceFile, SyntaxError, TextRange, TextSize, Token}; | 12 | use crate::{ast, fuzz, tokenize, AstNode, SourceFile, SyntaxError, TextRange, TextSize, Token}; |
13 | 13 | ||
@@ -153,7 +153,7 @@ fn reparse_fuzz_tests() { | |||
153 | /// Test that Rust-analyzer can parse and validate the rust-analyzer | 153 | /// Test that Rust-analyzer can parse and validate the rust-analyzer |
154 | #[test] | 154 | #[test] |
155 | fn self_hosting_parsing() { | 155 | fn self_hosting_parsing() { |
156 | let dir = project_dir().join("crates"); | 156 | let dir = project_root().join("crates"); |
157 | let files = walkdir::WalkDir::new(dir) | 157 | let files = walkdir::WalkDir::new(dir) |
158 | .into_iter() | 158 | .into_iter() |
159 | .filter_entry(|entry| { | 159 | .filter_entry(|entry| { |
@@ -193,7 +193,7 @@ fn self_hosting_parsing() { | |||
193 | } | 193 | } |
194 | 194 | ||
195 | fn test_data_dir() -> PathBuf { | 195 | fn test_data_dir() -> PathBuf { |
196 | project_dir().join("crates/syntax/test_data") | 196 | project_root().join("crates/syntax/test_data") |
197 | } | 197 | } |
198 | 198 | ||
199 | fn assert_errors_are_present(errors: &[SyntaxError], path: &Path) { | 199 | fn assert_errors_are_present(errors: &[SyntaxError], path: &Path) { |