diff options
Diffstat (limited to 'crates/tools/tests/cli.rs')
-rw-r--r-- | crates/tools/tests/cli.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs index 2d238d9ea..2ee4b5223 100644 --- a/crates/tools/tests/cli.rs +++ b/crates/tools/tests/cli.rs | |||
@@ -1,15 +1,23 @@ | |||
1 | extern crate tools; | 1 | use tools::{generate, gen_tests, run_rustfmt, Verify}; |
2 | |||
3 | use tools::{generate, run_rustfmt, Verify}; | ||
4 | 2 | ||
5 | #[test] | 3 | #[test] |
6 | fn verify_template_generation() { | 4 | fn generated_grammar_is_fresh() { |
7 | if let Err(error) = generate(Verify) { | 5 | if let Err(error) = generate(Verify) { |
8 | panic!("{}. Please update it by running `cargo gen-syntax`", error); | 6 | panic!("{}. Please update it by running `cargo gen-syntax`", error); |
9 | } | 7 | } |
10 | } | 8 | } |
11 | 9 | ||
12 | #[test] | 10 | #[test] |
11 | fn generated_tests_are_fresh() { | ||
12 | if let Err(error) = gen_tests(Verify) { | ||
13 | panic!( | ||
14 | "{}. Please update tests by running `cargo gen-tests`", | ||
15 | error | ||
16 | ); | ||
17 | } | ||
18 | } | ||
19 | |||
20 | #[test] | ||
13 | fn check_code_formatting() { | 21 | fn check_code_formatting() { |
14 | if let Err(error) = run_rustfmt(Verify) { | 22 | if let Err(error) = run_rustfmt(Verify) { |
15 | panic!( | 23 | panic!( |