From 155fa8032c23bbc9edfa7d3133ece0b58ba3d52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 6 Mar 2022 13:32:56 +0100 Subject: [PATCH] test: cover 32-bit sizes in generatePrime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/42207 Reviewed-By: Rich Trott Reviewed-By: Juan José Arboleda Reviewed-By: Benjamin Gruenbaum Reviewed-By: Darshan Sen Reviewed-By: Mestery --- test/parallel/test-crypto-prime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-crypto-prime.js b/test/parallel/test-crypto-prime.js index 749221b4514ef3..2d3f39aec15a08 100644 --- a/test/parallel/test-crypto-prime.js +++ b/test/parallel/test-crypto-prime.js @@ -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' });