diff options
Diffstat (limited to '')
-rw-r--r-- | dhall/src/tests.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs index ce74606..6b2ab60 100644 --- a/dhall/src/tests.rs +++ b/dhall/src/tests.rs @@ -43,6 +43,7 @@ pub enum Feature { Parser, Import, Normalization, + AlphaNormalization, Typecheck, TypeInference, } @@ -83,6 +84,7 @@ pub fn run_test( Parser => "parser/", Import => "import/", Normalization => "normalization/", + AlphaNormalization => "alpha-normalization/", Typecheck => "typecheck/", TypeInference => "type-inference/", }; @@ -139,6 +141,11 @@ pub fn run_test( let expr = expr.skip_typecheck().normalize(); assert_eq_display!(expr, expected); } + AlphaNormalization => { + let expr = + expr.skip_typecheck().normalize().to_expr_alpha(); + assert_eq_display!(expr, expected.to_expr()); + } } } Failure => { @@ -154,7 +161,7 @@ pub fn run_test( Import => { parse_file_str(&file_path)?.resolve().unwrap_err(); } - Normalization => unreachable!(), + Normalization | AlphaNormalization => unreachable!(), Typecheck | TypeInference => { parse_file_str(&file_path)? .skip_resolve()? |