Rework acceptance test 014 to smaller reproducible scenario

This commit is contained in:
KtorZ 2022-12-14 10:14:58 +01:00
parent 7c54283e69
commit bd956efd36
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 5 additions and 15 deletions

View File

@ -1,17 +1,7 @@
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: // NOTE:
// Somehow, the left-hand evaluates to: [#02, #01, #00, #32] // Somehow, the left-hand evaluates to: [#00, #20, #21]
test range_2() { // whereas the right-hand evaluates to: [#21, #20, #00]
range(0 - 1, 2) == [0 - 1, 0, 1, 2] //
test foo() {
[0 - 2, 0 - 1, 0] == [-2, -1, 0]
} }