leo/tests/compiler/function/iteration.leo

13 lines
162 B
Plaintext
Raw Normal View History

2020-06-23 04:28:30 +03:00
function one() -> u32 {
return 1u32;
2020-06-23 04:28:30 +03:00
}
2020-07-30 22:10:33 +03:00
function main() {
let a = 0u32;
2020-06-23 04:28:30 +03:00
2020-07-17 22:59:18 +03:00
for i in 0..10 {
a += one();
}
2020-06-23 04:28:30 +03:00
2020-08-17 05:14:26 +03:00
console.assert(a == 10u32);
2020-06-23 04:28:30 +03:00
}