built-ins/BigInt/*: make all indentation consistent (depth & character) (#1418)

This commit is contained in:
Rick Waldron 2018-02-15 15:57:16 -05:00 committed by Leo Balter
parent 4b5f07a9ff
commit 6c50d46b39
13 changed files with 70 additions and 68 deletions

View File

@ -52,18 +52,14 @@ assert.sameValue(BigInt.asIntN(64, 0xabcdef0123456789abcdefn), 0x0123456789abcde
assert.sameValue(BigInt.asIntN(65, 0xabcdef0123456789abcdefn), -0xfedcba9876543211n); assert.sameValue(BigInt.asIntN(65, 0xabcdef0123456789abcdefn), -0xfedcba9876543211n);
assert.sameValue(BigInt.asIntN(200, assert.sameValue(BigInt.asIntN(200,
0xcffffffffffffffffffffffffffffffffffffffffffffffffffn), 0xcffffffffffffffffffffffffffffffffffffffffffffffffffn), -0x00000000000000000000000000000000000000000000000001n);
-0x00000000000000000000000000000000000000000000000001n
);
assert.sameValue(BigInt.asIntN(201, assert.sameValue(BigInt.asIntN(201,
0xcffffffffffffffffffffffffffffffffffffffffffffffffffn), 0xcffffffffffffffffffffffffffffffffffffffffffffffffffn),
0xffffffffffffffffffffffffffffffffffffffffffffffffffn 0xffffffffffffffffffffffffffffffffffffffffffffffffffn
); );
assert.sameValue(BigInt.asIntN(200, assert.sameValue(BigInt.asIntN(200,
0xc89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n), 0xc89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n), -0x761f7e209749a0124cd3001599f1aa2069fa9af59fc52a03acn);
-0x761f7e209749a0124cd3001599f1aa2069fa9af59fc52a03acn
);
assert.sameValue(BigInt.asIntN(201, assert.sameValue(BigInt.asIntN(201,
0xc89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n), 0xc89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n),
0x89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n 0x89e081df68b65fedb32cffea660e55df9605650a603ad5fc54n

View File

@ -22,4 +22,3 @@ let o = {
} }
assert.sameValue(BigInt(o), 44n); assert.sameValue(BigInt(o), 44n);

View File

@ -14,4 +14,3 @@ features: [BigInt]
assert.sameValue(BigInt(""), 0n); assert.sameValue(BigInt(""), 0n);
assert.sameValue(BigInt(" "), 0n); assert.sameValue(BigInt(" "), 0n);

View File

@ -34,4 +34,3 @@ for (let i = 0; i < 128; i++)
binaryString += "0"; binaryString += "0";
assert.sameValue(BigInt(binaryString), 340282366920938463463374607431768211456n); assert.sameValue(BigInt(binaryString), 340282366920938463463374607431768211456n);

View File

@ -24,4 +24,3 @@ assert.sameValue(BigInt("-18446744073709551616"), -18446744073709551616n);
assert.sameValue(BigInt("-7"), -7n); assert.sameValue(BigInt("-7"), -7n);
assert.sameValue(BigInt("-88"), -88n); assert.sameValue(BigInt("-88"), -88n);
assert.sameValue(BigInt("-900"), -900n); assert.sameValue(BigInt("-900"), -900n);

View File

@ -22,4 +22,3 @@ assert.sameValue(BigInt("0Xa"), 10n);
assert.sameValue(BigInt("0Xff"), 255n); assert.sameValue(BigInt("0Xff"), 255n);
assert.sameValue(BigInt("0Xfabc"), 64188n); assert.sameValue(BigInt("0Xfabc"), 64188n);
assert.sameValue(BigInt("0Xfffffffffffffffffff"), 75557863725914323419135n); assert.sameValue(BigInt("0Xfffffffffffffffffff"), 75557863725914323419135n);

View File

@ -20,4 +20,3 @@ assert.sameValue(BigInt("0o20"), 16n);
assert.sameValue(BigInt("0O7"), 7n); assert.sameValue(BigInt("0O7"), 7n);
assert.sameValue(BigInt("0O10"), 8n); assert.sameValue(BigInt("0O10"), 8n);
assert.sameValue(BigInt("0O20"), 16n); assert.sameValue(BigInt("0O20"), 16n);

View File

@ -18,4 +18,3 @@ assert.sameValue(BigInt("18446744073709551616 "), 18446744073709551616n);
assert.sameValue(BigInt(" 7 "), 7n); assert.sameValue(BigInt(" 7 "), 7n);
assert.sameValue(BigInt(" -197 "), -197n); assert.sameValue(BigInt(" -197 "), -197n);
assert.sameValue(BigInt(" "), 0n); assert.sameValue(BigInt(" "), 0n);

View File

@ -16,6 +16,8 @@ assert.throws(TypeError, function() {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
new BigInt({ new BigInt({
valueOf: function() { throw new Test262Error("unreachable"); } valueOf: function() {
throw new Test262Error("unreachable");
}
}); });
}); });

View File

@ -22,7 +22,9 @@ features: [BigInt, Symbol.toPrimitive]
var toString = BigInt.prototype.toString; var toString = BigInt.prototype.toString;
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
toString.call({x: 1n}); toString.call({
x: 1n
});
}, '{x: 1n}'); }, '{x: 1n}');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
@ -30,9 +32,15 @@ assert.throws(TypeError, function() {
}, '[1n]'); }, '[1n]');
var obj = { var obj = {
valueOf: function() { throw new Test262Error('no [[BigIntData]]') }, valueOf: function() {
toString: function() { throw new Test262Error('no [[BigIntData]]') }, throw new Test262Error('no [[BigIntData]]')
[Symbol.toPrimitive]: function() { throw new Test262Error('no [[BigIntData]]') } },
toString: function() {
throw new Test262Error('no [[BigIntData]]')
},
[Symbol.toPrimitive]: function() {
throw new Test262Error('no [[BigIntData]]')
}
}; };
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
toString.call(obj); toString.call(obj);

View File

@ -14,13 +14,16 @@ features: [BigInt]
assert.throws(Test262Error, function() { assert.throws(Test262Error, function() {
BigInt({ BigInt({
valueOf: function() { throw new Test262Error(); } valueOf: function() {
throw new Test262Error();
}
}); });
}); });
assert.throws(Test262Error, function() { assert.throws(Test262Error, function() {
BigInt({ BigInt({
toString: function() { throw new Test262Error(); } toString: function() {
throw new Test262Error();
}
}); });
}); });