summaryrefslogtreecommitdiff
path: root/dhall/tests
diff options
context:
space:
mode:
authorNadrieril2019-04-07 01:41:08 +0200
committerNadrieril2019-04-07 01:41:52 +0200
commit619290e208f59bb15fc4f9d4b6dae2c19bb7b711 (patch)
tree37ae412b592fc4ae7ca9c109ef97e0600f3588b3 /dhall/tests
parentb96f187dfc6373b6e2faee01e085d7e3dff893ca (diff)
Augment stack size for typecheck tests
Diffstat (limited to 'dhall/tests')
-rw-r--r--dhall/tests/common/mod.rs20
-rw-r--r--dhall/tests/typecheck.rs6
2 files changed, 18 insertions, 8 deletions
diff --git a/dhall/tests/common/mod.rs b/dhall/tests/common/mod.rs
index 861df63..3c2fc3c 100644
--- a/dhall/tests/common/mod.rs
+++ b/dhall/tests/common/mod.rs
@@ -113,11 +113,21 @@ pub fn run_test(base_path: &str, feature: Feature) {
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 = rc(read_dhall_file(&expr_file_path).unwrap());
- let expected = rc(read_dhall_file(&expected_file_path).unwrap());
- typecheck::type_of(rc(ExprF::Annot(expr, expected))).unwrap();
+ // Many tests stack overflow in debug mode
+ std::thread::Builder::new()
+ .stack_size(4 * 1024 * 1024)
+ .spawn(|| {
+ let expr_file_path = base_path.clone() + "A.dhall";
+ let expected_file_path = base_path + "B.dhall";
+ let expr = rc(read_dhall_file(&expr_file_path).unwrap());
+ let expected =
+ rc(read_dhall_file(&expected_file_path).unwrap());
+ typecheck::type_of(rc(ExprF::Annot(expr, expected)))
+ .unwrap();
+ })
+ .unwrap()
+ .join()
+ .unwrap();
}
TypeInferenceFailure => {
let file_path = base_path + ".dhall";
diff --git a/dhall/tests/typecheck.rs b/dhall/tests/typecheck.rs
index 56a8823..6e05a87 100644
--- a/dhall/tests/typecheck.rs
+++ b/dhall/tests/typecheck.rs
@@ -87,8 +87,8 @@ tc_success!(spec_typecheck_success_prelude_List_replicate_0, "prelude/List/repli
tc_success!(spec_typecheck_success_prelude_List_replicate_1, "prelude/List/replicate/1");
tc_success!(spec_typecheck_success_prelude_List_reverse_0, "prelude/List/reverse/0");
tc_success!(spec_typecheck_success_prelude_List_reverse_1, "prelude/List/reverse/1");
-// tc_success!(spec_typecheck_success_prelude_List_shifted_0, "prelude/List/shifted/0");
-// tc_success!(spec_typecheck_success_prelude_List_shifted_1, "prelude/List/shifted/1");
+tc_success!(spec_typecheck_success_prelude_List_shifted_0, "prelude/List/shifted/0");
+tc_success!(spec_typecheck_success_prelude_List_shifted_1, "prelude/List/shifted/1");
tc_success!(spec_typecheck_success_prelude_List_unzip_0, "prelude/List/unzip/0");
tc_success!(spec_typecheck_success_prelude_List_unzip_1, "prelude/List/unzip/1");
tc_success!(spec_typecheck_success_prelude_Monoid_00, "prelude/Monoid/00");
@@ -96,7 +96,7 @@ tc_success!(spec_typecheck_success_prelude_Monoid_01, "prelude/Monoid/01");
tc_success!(spec_typecheck_success_prelude_Monoid_02, "prelude/Monoid/02");
tc_success!(spec_typecheck_success_prelude_Monoid_03, "prelude/Monoid/03");
tc_success!(spec_typecheck_success_prelude_Monoid_04, "prelude/Monoid/04");
-// tc_success!(spec_typecheck_success_prelude_Monoid_05, "prelude/Monoid/05");
+tc_success!(spec_typecheck_success_prelude_Monoid_05, "prelude/Monoid/05");
tc_success!(spec_typecheck_success_prelude_Monoid_06, "prelude/Monoid/06");
tc_success!(spec_typecheck_success_prelude_Monoid_07, "prelude/Monoid/07");
tc_success!(spec_typecheck_success_prelude_Monoid_08, "prelude/Monoid/08");