mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 03:04:13 +03:00
Add tests
This commit is contained in:
parent
87bed1e766
commit
1b95340edc
24
tests/compiler/finalize/private_input_ouput_fail.leo
Normal file
24
tests/compiler/finalize/private_input_ouput_fail.leo
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
transition foo(public a: u8) -> u8 {
|
||||
async finalize(a);
|
||||
return a + a;
|
||||
}
|
||||
|
||||
finalize foo(private a: u8) -> u8 {
|
||||
return a * a;
|
||||
}
|
||||
|
||||
transition bar(public a: u8) -> u8 {
|
||||
async finalize (a);
|
||||
return a + a;
|
||||
}
|
||||
|
||||
finalize bar(a: u8) -> private u8 {
|
||||
return a * a;
|
||||
}
|
||||
}
|
11
tests/compiler/function/private_input_output.leo
Normal file
11
tests/compiler/function/private_input_output.leo
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
transition foo(private a: u8, public b: u8) -> private u8 {
|
||||
let c: u8 = a + b;
|
||||
return c;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user