Add new acceptance test scenario (010)
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:688:33
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
This commit is contained in:
14
examples/acceptance_tests/010/lib/test.ak
Normal file
14
examples/acceptance_tests/010/lib/test.ak
Normal file
@@ -0,0 +1,14 @@
|
||||
pub fn map(opt: Option<a>, f: fn(a) -> b) -> Option<b> {
|
||||
when opt is {
|
||||
None -> None
|
||||
Some(a) -> Some(f(a))
|
||||
}
|
||||
}
|
||||
|
||||
fn add_one(n: Int) -> Int {
|
||||
n + 1
|
||||
}
|
||||
|
||||
test map_1() {
|
||||
map(None, add_one) == None
|
||||
}
|
||||
Reference in New Issue
Block a user