From 244735d3256d23bbec406f6f20e52adf05e5f68e Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sat, 31 Aug 2019 21:36:36 -0400 Subject: [PATCH] Add some more tests --- tests/test_infer.rs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/test_infer.rs b/tests/test_infer.rs index 1371652df1..734ba6d827 100644 --- a/tests/test_infer.rs +++ b/tests/test_infer.rs @@ -403,6 +403,18 @@ mod test_infer { // CALLING FUNCTIONS + #[test] + fn call_returns_num() { + infer_eq( + indoc!(r#" + alwaysFive = \_ -> 5 + + alwaysFive "stuff" + "#), + "Num.Num *" + ); + } + #[test] fn call_returns_list() { infer_eq( @@ -415,11 +427,23 @@ mod test_infer { ); } - // TODO calling functions // TODO conditionals // TODO type annotations // TODO BoundTypeVariables +// #[test] +// fn indirect_always() { +// infer_eq( +// indoc!(r#" +// always = \val -> (\_ -> val) +// alwaysFoo = always "foo" + +// alwaysFoo 42 +// "#), +// "String.String" +// ); +// } + // #[test] // fn identity() { // infer_eq(