rust/crates/tools/tests/cli.rs
Muhammad Mominul Huque 857c1650ef Various changes
Pin to a specific toolchain version
Format checking functionality
Add a test to check the code formatting.
Remove macro_use attribute
2018-10-31 23:39:21 +03:00

19 lines
414 B
Rust

extern crate tools;
use tools::{
generate, Verify, run_rustfmt,
};
#[test]
fn verify_template_generation() {
if let Err(error) = generate(Verify) {
panic!("{}. Please update it by running `cargo gen-syntax`", error);
}
}
#[test]
fn check_code_formatting() {
if let Err(error) = run_rustfmt(Verify) {
panic!("{}. Please format the code by running `cargo format`", error);
}
}