mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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: https://github.com/v8/v8/commit/e8c9649e2570c7e278e70a6584738a3c3f828b2b PR-URL: https://github.com/nodejs/node/pull/14476 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
This commit is contained in:
1 parent
4e8bc7181c
commit
753b68f9d8
1 file changed
+1
-1
+1
-1
@@ -26,4 +26,4 @@ if (!binding.ensureAllocation(2 * kStringMaxLength))
|
||||
common.skip(skipMessage);
|
||||
|
||||
const maxString = buf.toString('utf16le');
|
||||
assert.strictEqual(maxString.length, (kStringMaxLength + 2) / 2);
|
||||
assert.strictEqual(maxString.length, Math.floor((kStringMaxLength + 2) / 2));
|
||||
Reference in new issue
Block a user