more tests

This commit is contained in:
0rphon 2022-06-16 13:07:40 -07:00
parent 1cc47e9d08
commit 66286ca88e
5 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,13 @@
/*
namespace: Compile
expectation: Pass
input_file: inputs/address1.in
*/
function main (x: address) -> bool {
let a: address = aleo1fj982yqchhy973kz7e9jk6er7t6qd6jm9anplnlprem507w6lv9spwvfxx;
let b = x.eq(a);
let c = x.neq(a);
return c;
}

View File

@ -0,0 +1,25 @@
/*
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;
}

View File

@ -0,0 +1,29 @@
/*
namespace: Compile
expectation: Pass
input_file:
- inputs/fields.in
*/
function main(a: field, b: field) -> bool {
// unary
let f: i8 = a.inv();
let g: i8 = a.neg();
let i: i8 = a.square();
// binary
let j: i8 = a.add(b);
let m: i8 = a.div(b);
let o: bool = a.eq(b);
let p: bool = a.ge(b);
let q: bool = a.gt(b);
let r: bool = a.le(b);
let s: bool = a.lt(b);
let t: i8 = a.mul(b);
let w: bool = a.neq(b);
let z: i8 = a.pow(2u8);
let aa: i8 = a.pow(2u16);
let ab: i8 = a.pow(2u32);
return f;
}

View File

@ -0,0 +1,19 @@
/*
namespace: Compile
expectation: Pass
input_file: inputs/three.in
*/
function main(a: group, b: group) -> bool {
// unary
let e: i8 = a.double();
let g: i8 = a.neg();
// binary
let j: i8 = a.add(b);
let o: bool = a.eq(b);
let t: i8 = a.mul(b);
let w: bool = a.neq(b);
return a == b;
}

View File

@ -0,0 +1,20 @@
/*
namespace: Compile
expectation: Pass
input_file:
- inputs/scalars.in
*/
function main(a: scalar, b: scalar) -> bool {
// binary
let j: i8 = a.add(b);
let o: bool = a.eq(b);
let p: bool = a.ge(b);
let q: bool = a.gt(b);
let r: bool = a.le(b);
let s: bool = a.lt(b);
let t: i8 = a.mul(b);
let w: bool = a.neq(b);
return a == b;
}