mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 10:41:57 +03:00
Add test
This commit is contained in:
parent
ebd06d292a
commit
adb382cb33
24
tests/compiler/statements/loop_non_literal_bound_fail.leo
Normal file
24
tests/compiler/statements/loop_non_literal_bound_fail.leo
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
namespace: Compile
|
||||||
|
expectation: Fail
|
||||||
|
*/
|
||||||
|
|
||||||
|
program test.aleo {
|
||||||
|
record Token {
|
||||||
|
owner: address,
|
||||||
|
gates: u64,
|
||||||
|
amount: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
transition main(owner: address, amount: u64) -> Token {
|
||||||
|
let max: u64 = 0u64;
|
||||||
|
for i:u64 in 0u64..amount {
|
||||||
|
max = i;
|
||||||
|
}
|
||||||
|
return Token {
|
||||||
|
owner: owner,
|
||||||
|
gates: 0u64,
|
||||||
|
amount: amount,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user