Add new acceptance test scenario (020)

```
  Error: 020/lib/test.ak

    × map_2 failed
    help: ┍━ left ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
          │ Type mismatch expected 'integer' got 'data' │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━━━━━━━┑
          │ (con data #d8799f0fff) │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━┙
  ```
This commit is contained in:
KtorZ 2022-12-15 09:55:40 +01:00 committed by Lucas
parent e3ea511b79
commit ed58a1cac7
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,2 @@
name = "acceptance_test_020"
version = "0.0.0"

View File

@ -0,0 +1,10 @@
pub fn map(opt: Option<a>, f: fn(a) -> result) -> Option<result> {
when opt is {
None -> None
Some(a) -> Some(f(a))
}
}
test map_2() {
map(Some(14), fn(n) { n + 1 }) == Some(15)
}