mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-26 16:37:30 +03:00
Add tests; regen expectations
This commit is contained in:
parent
28eb05f56d
commit
a11be415fa
@ -15,12 +15,6 @@ program test.aleo {
|
||||
increment(account, receiver, amount);
|
||||
}
|
||||
|
||||
transition public_adder(public a: u8, public b: u8) {
|
||||
async finalize(a, b);
|
||||
} finalize public_adder(a: u8, b: u8) -> public u8 {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
transition finalize_no_params() {
|
||||
async finalize();
|
||||
}
|
||||
|
25
tests/compiler/finalize/finalize_with_return.leo
Normal file
25
tests/compiler/finalize/finalize_with_return.leo
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
mapping account: address => u64;
|
||||
mapping values: u8 => u8;
|
||||
|
||||
transition mint_public(public receiver: address, public amount: u64) {
|
||||
async finalize(receiver, amount);
|
||||
}
|
||||
|
||||
finalize mint_public (public receiver: address, public amount: u64) -> u64 {
|
||||
increment(account, receiver, amount);
|
||||
return amount;
|
||||
}
|
||||
|
||||
transition public_adder(public a: u8, public b: u8) {
|
||||
async finalize(a, b);
|
||||
} finalize public_adder(a: u8, b: u8) -> public u8 {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
outputs:
|
||||
- output:
|
||||
- initial_input_ast: no input
|
||||
initial_ast: c180c2c668e316551d5c0d77e7febc4ef772872ef76c12e6e48dc61bc777f751
|
||||
unrolled_ast: c180c2c668e316551d5c0d77e7febc4ef772872ef76c12e6e48dc61bc777f751
|
||||
ssa_ast: 04b3a2544c7137c8d82bd9a0085e50b2f97f61d28a1d97f434aa46f360d46baa
|
||||
flattened_ast: ab2ae56fc23c7d50ce49621b505c51a99f9ff998267ad040c9ab5d9c2b175874
|
||||
initial_ast: f5ac590daecc996e9cc6cdc278f00f98d1e3dccf206cafcdb650b7c035869730
|
||||
unrolled_ast: f5ac590daecc996e9cc6cdc278f00f98d1e3dccf206cafcdb650b7c035869730
|
||||
ssa_ast: f5ac590daecc996e9cc6cdc278f00f98d1e3dccf206cafcdb650b7c035869730
|
||||
flattened_ast: 6201d1691c08db31c77cc24c1ef5e53dd6c34fa22a33e149b3ab1f7368492009
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- output:
|
||||
- initial_input_ast: no input
|
||||
initial_ast: 111c640307a93403153d58afb9d7bc49f010b5d37f9aab4076d204700f90cf99
|
||||
unrolled_ast: 111c640307a93403153d58afb9d7bc49f010b5d37f9aab4076d204700f90cf99
|
||||
ssa_ast: 33ba61ddd5299b3d69276f0c63bbb7fda9d62875df2ad51b989800dbbe46d25a
|
||||
flattened_ast: a4321379b8e6055256632271d5121fae5cfe6f55d5a92f7453b92b889aa7e2fc
|
Loading…
Reference in New Issue
Block a user