aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests/cli.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-26 23:35:49 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-26 23:35:49 +0000
commit2577a65684a61fe8ef9159809ca5352c9ac2e61d (patch)
tree507d92f82bbcd214c625caf17eb4c120754c5d7c /crates/tools/tests/cli.rs
parent7f9a6521efc6939bb395238d249ee3a397fa4446 (diff)
parent7177fffd7b65c584b22abe42ec9845ec0a70565c (diff)
Merge #687
687: fix verificatio on ci r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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!(