v8/test/mjsunit/harmony/bigint/too-big-literal.js
Georg Neis a68831281a [bigint] Remove --no-opt flag from various mjsunit tests.
These now pass even when forcing optimization.

TBR=jkummerow@chromium.org

Bug: v8:6791
Change-Id: I4d7c7d37b48e6e970d33474fa7fd637e34b0bda0
Reviewed-on: https://chromium-review.googlesource.com/803374
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49781}
2017-12-01 10:27:14 +00:00

15 lines
464 B
JavaScript

// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Flags: --harmony-bigint
const MAX_BIGINT_BITS = 1024 * 1024; // Matches BigInt::kMaxLengthBits
const MAX_BIGINT_CHARS = MAX_BIGINT_BITS / 4;
const TOO_MANY_ONES = Array(MAX_BIGINT_CHARS + 2).join("1") + "n";
const tooBigHex = "0x" + TOO_MANY_ONES;
assertThrows(tooBigHex, SyntaxError);