Skip to content

Commit 753b68f

Browse files
committed
test: support odd value for kStringMaxLength
V8 6.2 will support a larger maximum string length on 64-bit platforms. Update the test to take into account its odd value ((1 << 30) - 1 - 24). Refs: v8/v8@e8c9649 PR-URL: nodejs#14476 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]>
1 parent 4e8bc71 commit 753b68f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/addons/stringbytes-external-exceed-max/test-stringbytes-external-exceed-max-by-2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ if (!binding.ensureAllocation(2 * kStringMaxLength))
2626
common.skip(skipMessage);
2727

2828
const maxString = buf.toString('utf16le');
29-
assert.strictEqual(maxString.length, (kStringMaxLength + 2) / 2);
29+
assert.strictEqual(maxString.length, Math.floor((kStringMaxLength + 2) / 2));

0 commit comments

Comments
 (0)