aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-16 18:54:33 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-16 18:54:33 +0100
commit06ab643b007592a7f76309e3c9cb2e715e211a96 (patch)
tree75f6dacf0c0a8a1c19c7f1ac8b369e6f49048115 /crates/tools/tests
parent1216878f7be20dd0e652fb8cdc395009fdcfae07 (diff)
parentb43bcd43c604126c2b250a30cc56459be754572a (diff)
Merge #136
136: Teraro r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/tools/tests')
-rw-r--r--crates/tools/tests/cli.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs
index 16899bb5f..0bb5d15d8 100644
--- a/crates/tools/tests/cli.rs
+++ b/crates/tools/tests/cli.rs
@@ -1,23 +1,12 @@
1extern crate tools; 1extern crate tools;
2 2
3use tools::{ 3use tools::{
4 project_root, render_template, update, AST, AST_TEMPLATE, SYNTAX_KINDS, SYNTAX_KINDS_TEMPLATE, 4 generate, Verify
5}; 5};
6 6
7#[test] 7#[test]
8fn verify_template_generation() { 8fn verify_template_generation() {
9 if let Err(error) = update( 9 if let Err(error) = generate(Verify) {
10 &project_root().join(SYNTAX_KINDS),
11 &render_template(&project_root().join(SYNTAX_KINDS_TEMPLATE)).unwrap(),
12 true,
13 ) {
14 panic!("{}. Please update it by running `cargo gen-kinds`", error);
15 }
16 if let Err(error) = update(
17 &project_root().join(AST),
18 &render_template(&project_root().join(AST_TEMPLATE)).unwrap(),
19 true,
20 ) {
21 panic!("{}. Please update it by running `cargo gen-kinds`", error); 10 panic!("{}. Please update it by running `cargo gen-kinds`", error);
22 } 11 }
23} 12}