mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-30 15:03:42 +00:00
32 lines
845 B
Rust
32 lines
845 B
Rust
use xtask::{
|
|
codegen::{self, Mode},
|
|
run_rustfmt,
|
|
};
|
|
|
|
#[test]
|
|
fn generated_grammar_is_fresh() {
|
|
if let Err(error) = codegen::generate_syntax(Mode::Verify) {
|
|
panic!("{}. Please update it by running `cargo xtask codegen`", error);
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn generated_tests_are_fresh() {
|
|
if let Err(error) = codegen::generate_parser_tests(Mode::Verify) {
|
|
panic!("{}. Please update tests by running `cargo xtask codegen`", error);
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn generated_assists_are_fresh() {
|
|
if let Err(error) = codegen::generate_assists_docs(Mode::Verify) {
|
|
panic!("{}. Please update assists by running `cargo xtask codegen`", error);
|
|
}
|
|
}
|
|
|
|
#[test]
|
|
fn check_code_formatting() {
|
|
if let Err(error) = run_rustfmt(Mode::Verify) {
|
|
panic!("{}. Please format the code by running `cargo format`", error);
|
|
}
|
|
}
|