fixed tests

This commit is contained in:
0rphon 2022-06-16 13:22:32 -07:00
parent 66286ca88e
commit 94b506cf3f
10 changed files with 47 additions and 75 deletions

View File

@ -7,7 +7,7 @@ input_file: inputs/address1.in
function main (x: address) -> bool {
let a: address = aleo1fj982yqchhy973kz7e9jk6er7t6qd6jm9anplnlprem507w6lv9spwvfxx;
let b = x.eq(a);
let c = x.neq(a);
let b: bool = x.eq(a);
let c: bool = x.neq(a);
return c;
}

View File

@ -7,23 +7,21 @@ input_file:
function main(a: field, b: field) -> bool {
// unary
let f: i8 = a.inv();
let g: i8 = a.neg();
let i: i8 = a.square();
let f: field = a.inv();
let g: field = a.neg();
let i: field = a.square();
// binary
let j: i8 = a.add(b);
let m: i8 = a.div(b);
let j: field = a.add(b);
let m: field = 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 t: field = 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);
let z: field = a.pow(b);
return f;
}

View File

@ -6,13 +6,14 @@ input_file: inputs/three.in
function main(a: group, b: group) -> bool {
// unary
let e: i8 = a.double();
let g: i8 = a.neg();
let e: group = a.double();
let g: group = a.neg();
// binary
let j: i8 = a.add(b);
let j: group = a.add(b);
let o: bool = a.eq(b);
let t: i8 = a.mul(b);
let t: group = a.mul(2scalar);
let q: group = 2scalar.mul(a);
let w: bool = a.neq(b);
return a == b;

View File

@ -7,13 +7,14 @@ input_file:
function main(a: scalar, b: scalar) -> bool {
// binary
let j: i8 = a.add(b);
let j: scalar = 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 t: group = 2group.mul(b);
let u: group = a.mul(2scalar);
let w: bool = a.neq(b);
return a == b;

View File

@ -1,28 +0,0 @@
/*
namespace: ParseExpression
expectation: Pass
*/
1 & 1
2&3
1 & 2 & 3
1 == 2 & 3 == 4
1 & 2 & 3
1 == 2 & 3 == 4 & 5 == 6
!-x.and(y)
x.and(y).and(y).and(y)
-x.and(y)
(-x).and(y)
-(x.and(y))
(-x.and(y)).and(y)
!x.and(y)
(!x).and(y)
!(x.and(y))
(!x.and(y)).and(y)
(x.and(y) & x.and(y)).and(x.and(y) & x.and(y))

View File

@ -3,17 +3,17 @@ namespace: ParseExpression
expectation: Pass
*/
1 & 1
1u8 & 1u8
2&3
2u8&3
1 & 2 & 3
1u8 & 2u8 & 3u8
1 == 2 & 3 == 4
1u8 == 2u8 & 3u8 == 4u8
1 & 2 & 3
1u8 & 2u8 & 3u8
1 == 2 & 3 == 4 & 5 == 6
1u8 == 2u8 & 3u8 == 4u8 & 5u8 == 6u8
!-x.and(y)
x.and(y).and(y).and(y)

View File

@ -3,17 +3,17 @@ namespace: ParseExpression
expectation: Pass
*/
1 | 1
1u8 | 1u8
2|3
2u8|3u8
1 | 2 | 3
1u8 | 2u8 | 3u8
1 ^ 2 | 3 ^ 4
1u8 ^ 2u8 | 3u8 ^ 4u8
1 | 2 | 3
1u8 | 2u8 | 3u8
1 ^ 2 | 3 ^ 4 | 5 ^ 6
1u8 ^ 2u8 | 3u8 ^ 4u8 | 5u8 ^ 6u8
!-x.or(y)
x.or(y).or(y).or(y)

View File

@ -3,17 +3,17 @@ namespace: ParseExpression
expectation: Pass
*/
1 ^ 1
1u8 ^ 1u8
2^3
2u8^3u8
1 ^ 2 ^ 3
1u8 ^ 2u8 ^ 3u8
1 & 2 ^ 3 & 4
1u8 & 2u8 ^ 3u8 & 4u8
1 ^ 2 ^ 3
1u8 ^ 2u8 ^ 3u8
1 & 2 ^ 3 & 4 ^ 5 & 6
1u8 & 2u8 ^ 3u8 & 4u8 ^ 5u8 & 6u8
!-x.xor(y)
x.xor(y).xor(y).xor(y)

View File

@ -3,17 +3,17 @@ namespace: ParseExpression
expectation: Pass
*/
1 << 1
1u8 << 1u8
2<<3
2u8<<3u8
1 << 2 << 3
1u8 << 2u8 << 3u8
1 + 2 << 3 + 4
1u8 + 2u8 << 3u8 + 4u8
1 << 2 << 3
1u8 << 2u8 << 3u8
1 + 2 << 3 + 4 << 5 + 6
1u8 + 2u8 << 3u8 + 4u8 << 5u8 + 6u8
!-x.shl(y)
x.shl(y).shl(y).shl(y)

View File

@ -3,17 +3,17 @@ namespace: ParseExpression
expectation: Pass
*/
1 >> 1
1u8 >> 1u8
2>>3
2u8>>3u8
1 >> 2 >> 3
1u8 >> 2u8 >> 3u8
1 + 2 >> 3 + 4
1u8 + 2u8 >> 3u8 + 4u8
1 >> 2 >> 3
1u8 >> 2u8 >> 3u8
1 + 2 >> 3 + 4 >> 5 + 6
1u8 + 2u8 >> 3u8 + 4u8 >> 5u8 + 6u8
!-x.shr(y)
x.shr(y).shr(y).shr(y)