aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests/cli.rs
blob: 8c53a82304510cb498874ce9e972d5779a0cf9c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
    }
}