Skip to content

Commit 155fa80

Browse files
tniessendanielleadams
authored andcommitted
test: cover 32-bit sizes in generatePrime
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>
1 parent bc89191 commit 155fa80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-crypto-prime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const pCheckPrime = promisify(checkPrime);
4141
});
4242
});
4343

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

0 commit comments

Comments
 (0)