diff options
author | Nadrieril | 2019-03-17 22:02:10 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-17 22:02:10 +0100 |
commit | 4c08c603946fa0ac483317d85a71dd1f709eec74 (patch) | |
tree | df95a0c94da85e3a68005b114bf66b2df691c15d /dhall/tests/common | |
parent | 05454ab9936514409e1b3c97e36f3fb476d532ba (diff) |
Use Rc consistently everywhere
Diffstat (limited to 'dhall/tests/common')
-rw-r--r-- | dhall/tests/common/mod.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/dhall/tests/common/mod.rs b/dhall/tests/common/mod.rs index b60262b..4d64fea 100644 --- a/dhall/tests/common/mod.rs +++ b/dhall/tests/common/mod.rs @@ -97,25 +97,25 @@ pub fn run_test(base_path: &str, feature: Feature) { Normalization => { let expr_file_path = base_path.clone() + "A.dhall"; let expected_file_path = base_path + "B.dhall"; - let expr = read_dhall_file(&expr_file_path).unwrap(); - let expected = read_dhall_file(&expected_file_path).unwrap(); + let expr = rc(read_dhall_file(&expr_file_path).unwrap()); + let expected = rc(read_dhall_file(&expected_file_path).unwrap()); assert_eq_display!( - normalize::<_, X, _>(&expr), - normalize::<_, X, _>(&expected) + normalize::<_, X, _>(expr), + normalize::<_, X, _>(expected) ); } TypecheckFailure => { let file_path = base_path + ".dhall"; - let expr = read_dhall_file(&file_path).unwrap(); - typecheck::type_of(&expr).unwrap_err(); + let expr = rc(read_dhall_file(&file_path).unwrap()); + typecheck::type_of(expr).unwrap_err(); } TypecheckSuccess => { let expr_file_path = base_path.clone() + "A.dhall"; let expected_file_path = base_path + "B.dhall"; - let expr = read_dhall_file(&expr_file_path).unwrap(); - let expected = read_dhall_file(&expected_file_path).unwrap(); - typecheck::type_of(&Expr::Annot(bx(expr), bx(expected))).unwrap(); + let expr = rc(read_dhall_file(&expr_file_path).unwrap()); + let expected = rc(read_dhall_file(&expected_file_path).unwrap()); + typecheck::type_of(rc(Expr::Annot(expr, expected))).unwrap(); } } } |