Add tests

This commit is contained in:
d0cd 2022-11-12 09:52:52 -08:00
parent 87bed1e766
commit 1b95340edc
2 changed files with 35 additions and 0 deletions

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

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