leo/tests/compiler/integers/i64/ternary.leo
2021-05-10 20:19:19 +03:00

30 lines
424 B
Plaintext

/*
namespace: Compile
expectation: Pass
inputs:
- i64.in: |
[main]
s: bool = true;
a: i64 = 10;
b: i64 = 5;
c: i64 = 10;
[registers]
r0: bool = false;
- i64_rev.in: |
[main]
s: bool = false;
a: i64 = 10;
b: i64 = 5;
c: i64 = 5;
[registers]
r0: bool = false;
*/
function main(s: bool, a: i64, b: i64, c: i64) -> bool {
let r = s ? a : b;
return r == c;
}