v8/test/mjsunit/harmony/bigint/dec.js
Jakob Kummerow 21532b80c3 [bigint] Remove BigInt.parseInt
which was dropped from the proposal:
https://github.com/tc39/proposal-bigint/pull/101

Bug: v8:6791
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I5a3e0024900b34a322a23bcbc4bfdbdffbf8b9d4
Reviewed-on: https://chromium-review.googlesource.com/885510
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50877}
2018-01-26 02:51:58 +00:00

86 lines
2.5 KiB
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.
// Generated by tools/bigint-tester.py.
// Flags: --harmony-bigint
var data = [{
a: 0x26ffcdbd233a53e7ca4612f2b02e1f2c1d885c3177e7n,
r: 0x26ffcdbd233a53e7ca4612f2b02e1f2c1d885c3177e6n
}, {
a: 0xf2a29a35193377a223ef0d6d98db95eeb24a4165f288fd2b4an,
r: 0xf2a29a35193377a223ef0d6d98db95eeb24a4165f288fd2b49n
}, {
a: 0x454d22e29e6104n,
r: 0x454d22e29e6103n
}, {
a: -0xb00874640d30e6fce6bf79508378ed17e44dacb48a4200bce536cec462b3c2n,
r: -0xb00874640d30e6fce6bf79508378ed17e44dacb48a4200bce536cec462b3c3n
}, {
a: 0x4c151a24d765249c2bab4a1915b24b80ae437417c5n,
r: 0x4c151a24d765249c2bab4a1915b24b80ae437417c4n
}, {
a: -0xcbd476b1f9ca08ff820941n,
r: -0xcbd476b1f9ca08ff820942n
}, {
a: -0xe848e5830fa1035322b39c2cdd031109ca8n,
r: -0xe848e5830fa1035322b39c2cdd031109ca9n
}, {
a: -0x4d58c5e190f0ebac5bb36ca4d214069f69726c63a5n,
r: -0x4d58c5e190f0ebac5bb36ca4d214069f69726c63a6n
}, {
a: 0x9b396n,
r: 0x9b395n
}, {
a: 0x593921fe8b9d4906cn,
r: 0x593921fe8b9d4906bn
}, {
a: -0xe127928c7cecd6e9ca94d98e858f9c76a0fccac62203aac7710cef1f9e352n,
r: -0xe127928c7cecd6e9ca94d98e858f9c76a0fccac62203aac7710cef1f9e353n
}, {
a: 0xeb14cd952d06eb6fc613016f73b7339cbdd010n,
r: 0xeb14cd952d06eb6fc613016f73b7339cbdd00fn
}, {
a: -0xfdeab6a3dbd603137f680413fecc9e1c80n,
r: -0xfdeab6a3dbd603137f680413fecc9e1c81n
}, {
a: -0x7e9abbdfad170df2129dae8e15088a02b9ba99276a351a05n,
r: -0x7e9abbdfad170df2129dae8e15088a02b9ba99276a351a06n
}, {
a: 0x7b98f57n,
r: 0x7b98f56n
}, {
a: -0x919751deb470faa60d7c5c995c8bed72f9542d710fbbf1341n,
r: -0x919751deb470faa60d7c5c995c8bed72f9542d710fbbf1342n
}, {
a: -0xc5541d89b118a88afdd187228440427c8a24f9d9bn,
r: -0xc5541d89b118a88afdd187228440427c8a24f9d9cn
}, {
a: -0xe6c88a170595fn,
r: -0xe6c88a1705960n
}, {
a: -0xa1ffbfa388c332804dc4dc973n,
r: -0xa1ffbfa388c332804dc4dc974n
}, {
a: 0x67b768ce0c415127a77402861d1901dd7f60a8624ebea6ecafe03adc3cen,
r: 0x67b768ce0c415127a77402861d1901dd7f60a8624ebea6ecafe03adc3cdn
}];
var error_count = 0;
for (var i = 0; i < data.length; i++) {
var d = data[i];
var r = --d.a;
if (d.r !== r) {
print("Input: " + d.a.toString(16));
print("Result: " + r.toString(16));
print("Expected: " + d.r);
error_count++;
}
}
if (error_count !== 0) {
print("Finished with " + error_count + " errors.")
quit(1);
}