2018-10-14 16:32:57 +02:00
|
|
|
extern crate tools;
|
|
|
|
|
2018-10-15 23:44:23 +02:00
|
|
|
use tools::{
|
2018-10-31 20:50:43 +01:00
|
|
|
generate, Verify, run_rustfmt,
|
2018-10-15 23:44:23 +02:00
|
|
|
};
|
2018-10-14 16:32:57 +02:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn verify_template_generation() {
|
2018-10-16 19:53:19 +02:00
|
|
|
if let Err(error) = generate(Verify) {
|
2018-10-16 20:09:22 +02:00
|
|
|
panic!("{}. Please update it by running `cargo gen-syntax`", error);
|
2018-10-14 16:58:53 +02:00
|
|
|
}
|
2018-10-15 19:52:11 +02:00
|
|
|
}
|
2018-10-31 20:50:43 +01:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn check_code_formatting() {
|
|
|
|
if let Err(error) = run_rustfmt(Verify) {
|
|
|
|
panic!("{}. Please format the code by running `cargo format`", error);
|
|
|
|
}
|
|
|
|
}
|