aboutsummaryrefslogtreecommitdiff
path: root/xtask/tests
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/tests')
-rw-r--r--xtask/tests/tidy-tests/cli.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/xtask/tests/tidy-tests/cli.rs b/xtask/tests/tidy-tests/cli.rs
index 5d8ddea83..304d77d89 100644
--- a/xtask/tests/tidy-tests/cli.rs
+++ b/xtask/tests/tidy-tests/cli.rs
@@ -1,23 +1,26 @@
1use walkdir::WalkDir; 1use walkdir::WalkDir;
2use xtask::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify}; 2use xtask::{
3 codegen::{self, Mode},
4 project_root, run_rustfmt,
5};
3 6
4#[test] 7#[test]
5fn generated_grammar_is_fresh() { 8fn generated_grammar_is_fresh() {
6 if let Err(error) = generate_boilerplate(Verify) { 9 if let Err(error) = codegen::generate_syntax(Mode::Verify) {
7 panic!("{}. Please update it by running `cargo xtask codegen`", error); 10 panic!("{}. Please update it by running `cargo xtask codegen`", error);
8 } 11 }
9} 12}
10 13
11#[test] 14#[test]
12fn generated_tests_are_fresh() { 15fn generated_tests_are_fresh() {
13 if let Err(error) = gen_tests(Verify) { 16 if let Err(error) = codegen::generate_parser_tests(Mode::Verify) {
14 panic!("{}. Please update tests by running `cargo xtask gen-tests`", error); 17 panic!("{}. Please update tests by running `cargo xtask gen-tests`", error);
15 } 18 }
16} 19}
17 20
18#[test] 21#[test]
19fn check_code_formatting() { 22fn check_code_formatting() {
20 if let Err(error) = run_rustfmt(Verify) { 23 if let Err(error) = run_rustfmt(Mode::Verify) {
21 panic!("{}. Please format the code by running `cargo format`", error); 24 panic!("{}. Please format the code by running `cargo format`", error);
22 } 25 }
23} 26}