Skip to content

Commit

Permalink
Fix unary tests for fhevm-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
david-zk committed Aug 13, 2024
1 parent d25b730 commit 7c91ba3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fhevm-engine/src/tests/operators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ fn compute_expected_unary_output(inp: &BigInt, op: SupportedFheOperations, bits:
let inp: u32 = inp.try_into().unwrap();
BigInt::from(inp.not())
}
64 => {
let inp: u64 = inp.try_into().unwrap();
BigInt::from(inp.not())
}
other => {
panic!("unknown bits: {other}")
}
Expand All @@ -388,6 +392,10 @@ fn compute_expected_unary_output(inp: &BigInt, op: SupportedFheOperations, bits:
let inp: i32 = inp.try_into().unwrap();
BigInt::from(-inp as u32)
}
64 => {
let inp: i64 = inp.try_into().unwrap();
BigInt::from(-inp as u64)
}
other => {
panic!("unknown bits: {other}")
}
Expand Down

0 comments on commit 7c91ba3

Please sign in to comment.