diff options
author | Nadrieril | 2019-04-23 14:13:50 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-23 14:14:09 +0200 |
commit | 2f1fa26abd9c9f2b75d24b18877d3b278f7d2a01 (patch) | |
tree | 602fdc4982433680e82a0bfeb872140f09e828d0 /dhall/src/tests.rs | |
parent | 162d2a2a6d241d525346e295b0cf2ad43387bed5 (diff) |
Avoid duplicating work when matching on Pi types
Diffstat (limited to '')
-rw-r--r-- | dhall/src/tests.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs index c945b23..4d8fabd 100644 --- a/dhall/src/tests.rs +++ b/dhall/src/tests.rs @@ -71,7 +71,7 @@ pub fn run_test_with_bigger_stack( ) -> std::result::Result<(), String> { // Many tests stack overflow in debug mode let base_path: String = base_path.to_string(); - stacker::grow(4 * 1024 * 1024, move || { + stacker::grow(6 * 1024 * 1024, move || { run_test(&base_path, feature, status) .map_err(|e| e.to_string()) .map(|_| ()) @@ -135,12 +135,15 @@ pub fn run_test( assert_eq_display!(expr, expected); } Typecheck => { - expr.typecheck_with(&expected.into_type())?; + expr.typecheck_with(&expected.into_type()?)?; } TypeInference => { let expr = expr.typecheck()?; let ty = expr.get_type()?; - assert_eq_display!(ty.as_ref(), &expected.into_type()); + assert_eq_display!( + ty.as_normalized()?.as_expr(), + expected.into_type()?.as_normalized()?.as_expr() + ); } Normalization => { let expr = expr.skip_typecheck().normalize(); |