Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests update
  • Loading branch information
Amxx committed Jan 22, 2024
commit a1fc06f4726141aa6d6071d72cd6509274974ed1
7 changes: 2 additions & 5 deletions test/utils/math/Math.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,9 @@ describe('Math', function () {
const p = factors.reduce((acc, f) => acc * f, 1n);

describe(`using p=${p} which is ${(p > 1 && factors.length > 1) ? 'not ' : ''}a prime`, function () {
it('trying to inverse 0 reverts', async function () {
it('trying to inverse 0 returns 0', async function () {
expect(await this.mock.$invMod(0, p)).to.equal(0n);
});

it('trying to inverse p reverts', async function () {
expect(await this.mock.$invMod(p, p)).to.equal(0n);
expect(await this.mock.$invMod(p, p)).to.equal(0n); // p is 0 mod p
});

if (p != 0) {
Expand Down