mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Add some more tests
This commit is contained in:
parent
966bb60766
commit
244735d325
1 changed files with 25 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue