mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Restore some inference tests
This commit is contained in:
parent
a09eb41a92
commit
dc95c848c3
1 changed files with 54 additions and 50 deletions
|
@ -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>",
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue