Add new acceptance test scenario (019)

```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2001:81
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
This commit is contained in:
KtorZ 2022-12-15 09:53:25 +01:00 committed by Lucas
parent 287fbf2e3b
commit e3ea511b79
2 changed files with 16 additions and 0 deletions

View File

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

View File

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