mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 02:31:44 +03:00
Add execution test
This commit is contained in:
parent
ea1607ca81
commit
789bc52585
@ -8,7 +8,7 @@ program test.aleo {
|
||||
constant a: u8,
|
||||
private bar: bool,
|
||||
public bax: u16,
|
||||
baz: u32e
|
||||
baz: u32,
|
||||
}
|
||||
|
||||
transition main(a: u8) -> u8 {
|
||||
|
31
tests/tests/execution/mint.leo
Normal file
31
tests/tests/execution/mint.leo
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
namespace: Execute
|
||||
expectation: Pass
|
||||
cases:
|
||||
mint:
|
||||
- input: ["0u64"]
|
||||
- input: ["1u64"]
|
||||
*/
|
||||
|
||||
|
||||
program test.aleo {
|
||||
record Token {
|
||||
// The token owner.
|
||||
private owner: address,
|
||||
// The Aleo balance (in gates).
|
||||
public gates: u64,
|
||||
// The token amount.
|
||||
amount: u64,
|
||||
// The flag.
|
||||
constant flag: bool,
|
||||
}
|
||||
|
||||
transition mint(amount: u64) -> Token {
|
||||
return Token {
|
||||
owner: self.caller,
|
||||
gates: 0u64,
|
||||
amount: amount,
|
||||
flag: true,
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user