aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests
diff options
context:
space:
mode:
authorMuhammad Mominul Huque <[email protected]>2018-10-31 19:50:43 +0000
committerAleksey Kladov <[email protected]>2018-10-31 20:39:21 +0000
commit857c1650efdb51650458f9ec1119adaa49b34371 (patch)
treef6239e330db9880f1f0712032eb98645f719c363 /crates/tools/tests
parentd14610dab4b4fedee7a0d8f1739eb3e0691984c1 (diff)
Various changes
Pin to a specific toolchain version Format checking functionality Add a test to check the code formatting. Remove macro_use attribute
Diffstat (limited to 'crates/tools/tests')
-rw-r--r--crates/tools/tests/cli.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs
index 5de52fc2b..8c53a8230 100644
--- a/crates/tools/tests/cli.rs
+++ b/crates/tools/tests/cli.rs
@@ -1,7 +1,7 @@
1extern crate tools; 1extern crate tools;
2 2
3use tools::{ 3use tools::{
4 generate, Verify 4 generate, Verify, run_rustfmt,
5}; 5};
6 6
7#[test] 7#[test]
@@ -10,3 +10,10 @@ fn verify_template_generation() {
10 panic!("{}. Please update it by running `cargo gen-syntax`", error); 10 panic!("{}. Please update it by running `cargo gen-syntax`", error);
11 } 11 }
12} 12}
13
14#[test]
15fn check_code_formatting() {
16 if let Err(error) = run_rustfmt(Verify) {
17 panic!("{}. Please format the code by running `cargo format`", error);
18 }
19}