Add test case

This commit is contained in:
d0cd 2022-11-08 13:57:46 -08:00
parent 91db5c3b8a
commit 387db2e321
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,25 @@
/*
namespace: Compile
expectation: Pass
*/
program test.aleo {
function foo(a: u8, b: u8) -> (u8, u8) {
if (a == b) {
return (a, b);
}
let c: u8 = a + b;
let d: u8 = a - b;
return (c, d);
}
transition bar(flag: bool, a: u8, b: u8) -> (u8, u8) {
let start: (u8, u8) = foo(a, b);
if flag {
start = foo(start.0, start.1);
} else {
start = foo(start.1, start.0);
}
return start;
}
}

View File

@ -13,4 +13,5 @@ program test.aleo {
let c: u8 = a + b;
let d: u8 = a - b;
return (c, d);
}}
}
}