Add some tests that make the compiler panick.
This commit is contained in:
11
examples/tests/b/lib/main.ak
Normal file
11
examples/tests/b/lib/main.ak
Normal file
@@ -0,0 +1,11 @@
|
||||
pub fn repeat(x: a, n: Int) -> List(a) {
|
||||
if n <= 0 {
|
||||
[]
|
||||
} else {
|
||||
[x, ..repeat(x, n - 1)]
|
||||
}
|
||||
}
|
||||
|
||||
test repeat_1() {
|
||||
repeat("aiken", 0) == []
|
||||
}
|
||||
Reference in New Issue
Block a user