Skip to content

Commit

Permalink
test: only run prime test with supported OpenSSL
Browse files Browse the repository at this point in the history
PR-URL: #37212
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
tniessen authored and Trott committed Feb 9, 2021
1 parent 11d2010 commit 6e804a9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions test/parallel/test-crypto-prime.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ generatePrime(
code: 'ERR_OUT_OF_RANGE'
});

// This is possible and allowed (but makes little sense).
assert.strictEqual(generatePrimeSync(4, {
add: 15n,
rem: 13n,
bigint: true
}), 13n);
if (process.versions.openssl >= '1.1.1f') {
// This is possible and allowed (but makes little sense).
assert.strictEqual(generatePrimeSync(4, {
add: 15n,
rem: 13n,
bigint: true
}), 13n);
}
}

[1, 'hello', {}, []].forEach((i) => {
Expand Down

0 comments on commit 6e804a9

Please sign in to comment.