diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 23:35:49 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 23:35:49 +0000 |
commit | 2577a65684a61fe8ef9159809ca5352c9ac2e61d (patch) | |
tree | 507d92f82bbcd214c625caf17eb4c120754c5d7c /crates/tools/tests/cli.rs | |
parent | 7f9a6521efc6939bb395238d249ee3a397fa4446 (diff) | |
parent | 7177fffd7b65c584b22abe42ec9845ec0a70565c (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.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!( |