File tree Expand file tree Collapse file tree 2 files changed +33
-35
lines changed Expand file tree Collapse file tree 2 files changed +33
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- mod cli;
2
-
3
1
use std:: {
4
2
collections:: HashMap ,
5
3
path:: { Path , PathBuf } ,
6
4
} ;
7
5
8
- use xtask:: { not_bash:: fs2, project_root, rust_files} ;
6
+ use xtask:: {
7
+ codegen:: { self , Mode } ,
8
+ not_bash:: fs2,
9
+ project_root, run_rustfmt, rust_files,
10
+ } ;
11
+
12
+ #[ test]
13
+ fn generated_grammar_is_fresh ( ) {
14
+ if let Err ( error) = codegen:: generate_syntax ( Mode :: Verify ) {
15
+ panic ! ( "{}. Please update it by running `cargo xtask codegen`" , error) ;
16
+ }
17
+ }
18
+
19
+ #[ test]
20
+ fn generated_tests_are_fresh ( ) {
21
+ if let Err ( error) = codegen:: generate_parser_tests ( Mode :: Verify ) {
22
+ panic ! ( "{}. Please update tests by running `cargo xtask codegen`" , error) ;
23
+ }
24
+ }
25
+
26
+ #[ test]
27
+ fn generated_assists_are_fresh ( ) {
28
+ if let Err ( error) = codegen:: generate_assists_docs ( Mode :: Verify ) {
29
+ panic ! ( "{}. Please update assists by running `cargo xtask codegen`" , error) ;
30
+ }
31
+ }
32
+
33
+ #[ test]
34
+ fn check_code_formatting ( ) {
35
+ if let Err ( error) = run_rustfmt ( Mode :: Verify ) {
36
+ panic ! ( "{}. Please format the code by running `cargo format`" , error) ;
37
+ }
38
+ }
9
39
10
40
#[ test]
11
41
fn rust_files_are_tidy ( ) {
You can’t perform that action at this time.
0 commit comments