aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/tests/cli.rs')
-rw-r--r--crates/tools/tests/cli.rs16
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 @@
1extern crate tools; 1use tools::{generate, gen_tests, run_rustfmt, Verify};
2
3use tools::{generate, run_rustfmt, Verify};
4 2
5#[test] 3#[test]
6fn verify_template_generation() { 4fn 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]
11fn 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]
13fn check_code_formatting() { 21fn check_code_formatting() {
14 if let Err(error) = run_rustfmt(Verify) { 22 if let Err(error) = run_rustfmt(Verify) {
15 panic!( 23 panic!(