From b5f13d8d51ef9107363a60b894a741ab596921ce Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 23 Oct 2019 18:13:40 +0300 Subject: xtask: move codegen to a module --- xtask/tests/tidy-tests/cli.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xtask/tests/tidy-tests') 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 @@ use walkdir::WalkDir; -use xtask::{gen_tests, generate_boilerplate, project_root, run_rustfmt, Verify}; +use xtask::{ + codegen::{self, Mode}, + project_root, run_rustfmt, +}; #[test] fn generated_grammar_is_fresh() { - if let Err(error) = generate_boilerplate(Verify) { + if let Err(error) = codegen::generate_syntax(Mode::Verify) { panic!("{}. Please update it by running `cargo xtask codegen`", error); } } #[test] fn generated_tests_are_fresh() { - if let Err(error) = gen_tests(Verify) { + if let Err(error) = codegen::generate_parser_tests(Mode::Verify) { panic!("{}. Please update tests by running `cargo xtask gen-tests`", error); } } #[test] fn check_code_formatting() { - if let Err(error) = run_rustfmt(Verify) { + if let Err(error) = run_rustfmt(Mode::Verify) { panic!("{}. Please format the code by running `cargo format`", error); } } -- cgit v1.2.3