leo/tests/compiler/group/operator_methods.leo

20 lines
378 B
Plaintext
Raw Normal View History

2022-06-16 23:07:40 +03:00
/*
namespace: Compile
expectation: Pass
input_file: inputs/three.in
*/
function main(a: group, b: group) -> bool {
// unary
2022-06-16 23:22:32 +03:00
let e: group = a.double();
let g: group = a.neg();
2022-06-16 23:07:40 +03:00
// binary
2022-06-16 23:22:32 +03:00
let j: group = a.add(b);
2022-06-16 23:07:40 +03:00
let o: bool = a.eq(b);
2022-06-16 23:22:32 +03:00
let t: group = a.mul(2scalar);
let q: group = 2scalar.mul(a);
2022-06-16 23:07:40 +03:00
let w: bool = a.neq(b);
return a == b;
}