Skip to content

Commit

Permalink
test: cover 32-bit sizes in generatePrime
Browse files Browse the repository at this point in the history
PR-URL: #42207
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Mestery <[email protected]>
  • Loading branch information
tniessen authored and danielleadams committed Apr 24, 2022
1 parent bc89191 commit 155fa80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-prime.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const pCheckPrime = promisify(checkPrime);
});
});

[-1, 0].forEach((i) => {
[-1, 0, 2 ** 31, 2 ** 31 + 1, 2 ** 32 - 1, 2 ** 32].forEach((i) => {
assert.throws(() => generatePrime(i, common.mustNotCall()), {
code: 'ERR_OUT_OF_RANGE'
});
Expand Down

0 comments on commit 155fa80

Please sign in to comment.