fix: rename test module to tests
This commit is contained in:
18
examples/acceptance_tests/024/lib/tests.ak
Normal file
18
examples/acceptance_tests/024/lib/tests.ak
Normal file
@@ -0,0 +1,18 @@
|
||||
pub fn map2(
|
||||
opt_a: Option<a>,
|
||||
opt_b: Option<b>,
|
||||
f: fn(a, b) -> result,
|
||||
) -> Option<result> {
|
||||
when opt_a is {
|
||||
None -> None
|
||||
Some(a) ->
|
||||
when opt_b is {
|
||||
None -> None
|
||||
Some(b) -> Some(f(a, b))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test map2_3() {
|
||||
map2(Some(14), Some(42), fn(a, b) { #(a, b) }) == Some(#(14, 42))
|
||||
}
|
||||
Reference in New Issue
Block a user