rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6}
Also added a little Makefile to run them all in one go.
This commit is contained in:
16
examples/acceptance_tests/005/lib/test.ak
Normal file
16
examples/acceptance_tests/005/lib/test.ak
Normal file
@@ -0,0 +1,16 @@
|
||||
use aiken/builtin.{head_list}
|
||||
|
||||
pub fn head(xs: List<a>) -> Option<a> {
|
||||
when xs is {
|
||||
[] -> None
|
||||
_ -> Some(head_list(xs))
|
||||
}
|
||||
}
|
||||
|
||||
test head_1() {
|
||||
head([1, 2, 3]) == Some(1)
|
||||
}
|
||||
|
||||
test head_2() {
|
||||
head([]) == None
|
||||
}
|
||||
Reference in New Issue
Block a user