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 <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
  • Loading branch information
tniessen authored and sxa committed Mar 7, 2022
1 parent 0abc20b commit 0be3c61
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 0be3c61

Please sign in to comment.