summaryrefslogtreecommitdiff
path: root/dhall/src/tests.rs
diff options
context:
space:
mode:
authorNadrieril2019-05-02 17:07:11 +0200
committerNadrieril2019-05-02 17:07:11 +0200
commitdb3ca819283f9bd99d197de464717f0b58b52fe4 (patch)
tree51ae89e9b1153a7f9b3aa5dae38cfe4441aef9af /dhall/src/tests.rs
parentc13a4881b56bf2f5b2d5d4d0018a48927b45e7e0 (diff)
Instead of possibly nonexistent Type, treat Sort specially
Diffstat (limited to '')
-rw-r--r--dhall/src/tests.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index ebca256..ecd6e43 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -134,15 +134,12 @@ pub fn run_test(
assert_eq_display!(expr, expected);
}
Typecheck => {
- expr.typecheck_with(&expected.into_type()?)?;
+ expr.typecheck_with(&expected.to_type())?;
}
TypeInference => {
let expr = expr.typecheck()?;
- let ty = expr.get_type()?;
- assert_eq_display!(
- ty.as_normalized()?.as_expr(),
- expected.into_type()?.as_normalized()?.as_expr()
- );
+ let ty = expr.get_type()?.into_owned();
+ assert_eq_display!(ty.to_normalized(), expected);
}
Normalization => {
let expr = expr.skip_typecheck().normalize();