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 danielleadams committed Apr 24, 2022
1 parent d4b1b5c commit 623be18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-crypto-prime.js
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 623be18

Please sign in to comment.