Skip to content

Commit

Permalink
Merge pull request #17 from Kiruse/master
Browse files Browse the repository at this point in the history
Fix testModMul
  • Loading branch information
riordant authored Oct 9, 2024
2 parents e8bf61d + 962e630 commit 92f2337
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/BigNumbers.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ contract BigNumbersTest is Test {
BigNumber memory m = _m.init(false);
BigNumber memory res = a.modmul(b, m);

assertEq(res.val, hex"0000000000000000000000000000000000000000000000000000000000000da8");
assertEq(res.bitlen, 12);
assertEq(res.neg, false);

bytes memory _g = hex"04";
bytes memory _x = hex"03";
bytes memory _p = hex"0800";
Expand All @@ -273,7 +277,7 @@ contract BigNumbersTest is Test {

BigNumber memory newRes = g.modmul(x, p);

assertEq(newRes.val, hex"0c");
assertEq(newRes.val, hex"000000000000000000000000000000000000000000000000000000000000000c");
assertEq(newRes.bitlen, 4);
assertEq(newRes.neg, false);
}
Expand Down

0 comments on commit 92f2337

Please sign in to comment.