Add execution test

This commit is contained in:
d0cd 2023-02-10 22:56:14 -08:00
parent ea1607ca81
commit 789bc52585
2 changed files with 32 additions and 1 deletions

View File

@ -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 {

View 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,
};
}
}