Add new acceptance test scenario (014)
This commit is contained in:
parent
bc7c236b3b
commit
95df5f9137
|
@ -0,0 +1,2 @@
|
||||||
|
name = "acceptance_test_014"
|
||||||
|
version = "0.0.0"
|
|
@ -0,0 +1,17 @@
|
||||||
|
pub fn range(from: Int, to: Int) -> List<Int> {
|
||||||
|
if from > to {
|
||||||
|
[]
|
||||||
|
} else {
|
||||||
|
[from, ..range(from + 1, to)]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test range_1() {
|
||||||
|
range(0, 2) == [0, 1, 2]
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOTE:
|
||||||
|
// Somehow, the left-hand evaluates to: [#02, #01, #00, #32]
|
||||||
|
test range_2() {
|
||||||
|
range(0 - 1, 2) == [0 - 1, 0, 1, 2]
|
||||||
|
}
|
Loading…
Reference in New Issue