Add new acceptance test scenario (014)

This commit is contained in:
KtorZ 2022-12-14 01:08:41 +01:00
parent bc7c236b3b
commit 95df5f9137
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,2 @@
name = "acceptance_test_014"
version = "0.0.0"

View File

@ -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]
}