Restore some inference tests

This commit is contained in:
Richard Feldman 2019-11-09 03:32:23 -05:00
parent a09eb41a92
commit dc95c848c3

View file

@ -461,18 +461,20 @@ mod test_infer {
// TODO BoundTypeVariables // TODO BoundTypeVariables
// TODO conditionals // TODO conditionals
// #[test] #[test]
// fn indirect_always() { fn indirect_always() {
// infer_eq( infer_eq(
// indoc!(r#" indoc!(
// always = \val -> (\_ -> val) r#"
// alwaysFoo = always "foo" always = \val -> (\_ -> val)
alwaysFoo = always "foo"
// alwaysFoo 42 alwaysFoo 42
// "#), "#
// "Str" ),
// ); "Str",
// } );
}
// #[test] // #[test]
// fn identity() { // fn identity() {
@ -520,17 +522,17 @@ mod test_infer {
// ); // );
// } // }
#[test] // #[test]
fn basic_int_division() { // fn basic_int_division() {
infer_eq( // infer_eq(
indoc!( // indoc!(
r#" // r#"
1 // 2 // 1 // 2
"# // "#
), // ),
"Int", // "Int",
); // );
} // }
// #[test] // #[test]
// fn basic_addition() { // fn basic_addition() {
@ -540,17 +542,19 @@ mod test_infer {
// 1 + 2 // 1 + 2
// "# // "#
// ), // ),
// "Num *", // "Int",
// ); // );
// } // }
// #[test] // #[test]
// fn basic_circular_type() { // fn basic_circular_type() {
// assert_eq!( // infer_eq(
// infer(indoc!(r#" // indoc!(
// r#"
// \x -> x x // \x -> x x
// "#)), // "#
// Erroneous(Problem::CircularType) // ),
// "<Type Mismatch: Circular Type>",
// ); // );
// } // }