leo/tests/compiler/boolean/operator_methods.leo
2022-06-16 13:07:40 -07:00

25 lines
461 B
Plaintext

/*
namespace: Compile
expectation: Pass
input_file:
- inputs/false_false.in
- inputs/false_true.in
- inputs/true_false.in
- inputs/true_true.in
*/
function main(a: bool, b: bool) -> bool {
// unary
let h: bool = a.not();
// binary
let l: bool = a.and(b);
let o: bool = a.eq(b);
let v: bool = a.nand(b);
let w: bool = a.neq(b);
let x: bool = a.nor(b);
let y: bool = a.or(b);
let ar: bool = a.xor(b);
return h;
}