mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
Merge #4338
4338: Simplify tidy tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
2c7f5b8d40
2 changed files with 33 additions and 35 deletions
|
@ -1,32 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
|
@ -1,11 +1,41 @@
|
|||
mod cli;
|
||||
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use xtask::{not_bash::fs2, project_root, rust_files};
|
||||
use xtask::{
|
||||
codegen::{self, Mode},
|
||||
not_bash::fs2,
|
||||
project_root, run_rustfmt, rust_files,
|
||||
};
|
||||
|
||||
#[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);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rust_files_are_tidy() {
|
Loading…
Reference in a new issue