mirror of https://github.com/tc39/test262.git
Merge pull request #2416 from devsnek/fix-newlines
Add lint check for missing newlines at end of tests and fix tests without the newlines
This commit is contained in:
commit
13016eb89d
|
@ -126,4 +126,4 @@ arr.constructor = {
|
|||
assert.throws(Test262Error, function() {
|
||||
arr.flatMap(mapperFn);
|
||||
}, 'Return abrupt completion from getting the @@species');
|
||||
assert.sameValue(called, 1, 'got species once');
|
||||
assert.sameValue(called, 1, 'got species once');
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.add(new TA(ab), 0, 0n);
|
||||
}, '`Atomics.add(new TA(ab), 0, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.and(new TA(buffer), 0, 0n);
|
||||
}, '`Atomics.and(new TA(buffer), 0, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.compareExchange(new TA(buffer), 0, 0n, 0n);
|
||||
}, '`Atomics.compareExchange(new TA(buffer), 0, 0n, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.exchange(new TA(buffer), 0n, 0n);
|
||||
}, '`Atomics.exchange(new TA(buffer), 0n, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.or(new TA(buffer), 0, 0n);
|
||||
}, '`Atomics.or(new TA(buffer), 0, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.store(new TA(buffer), 0, 0n);
|
||||
}, '`Atomics.store(new TA(buffer), 0, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,4 +13,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
Atomics.sub(new TA(buffer), 0, 0n);
|
||||
}, '`Atomics.sub(new TA(buffer), 0, 0n)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1 +1 @@
|
|||
// Copyright (C) 2016 Michael Ficarra. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
description: Function.prototype.toString line terminator normalisation (CR)
info: |
Function.prototype.toString should not normalise line terminator sequences to Line Feed characters.
This file uses Carriage Return characters as line terminators.
includes: [nativeFunctionMatcher.js]
---*/
// before
function
// a
f
// b
(
// c
x
// d
,
// e
y
// f
)
// g
{
// h
;
// i
;
// j
}
// after
assertToStringOrNativeFunction(f, "function\r// a\rf\r// b\r(\r// c\rx\r// d\r,\r// e\ry\r// f\r)\r// g\r{\r// h\r;\r// i\r;\r// j\r}");
|
||||
// Copyright (C) 2016 Michael Ficarra. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject
description: Function.prototype.toString line terminator normalisation (CR)
info: |
Function.prototype.toString should not normalise line terminator sequences to Line Feed characters.
This file uses Carriage Return characters as line terminators.
includes: [nativeFunctionMatcher.js]
---*/
// before
function
// a
f
// b
(
// c
x
// d
,
// e
y
// f
)
// g
{
// h
;
// i
;
// j
}
// after
assertToStringOrNativeFunction(f, "function\r// a\rf\r// b\r(\r// c\rx\r// d\r,\r// e\ry\r// f\r)\r// g\r{\r// h\r;\r// i\r;\r// j\r}");
|
||||
|
|
|
@ -15,4 +15,4 @@ let indices = match.indices;
|
|||
|
||||
// `indices` is an array
|
||||
assert.sameValue(Object.getPrototypeOf(indices), Array.prototype);
|
||||
assert(Array.isArray(indices));
|
||||
assert(Array.isArray(indices));
|
||||
|
|
|
@ -54,4 +54,4 @@ assert.throws(TypeError, function() {
|
|||
assert.sameValue(
|
||||
getIterator, 0,
|
||||
"IsCallable(mapfn) check occurs before getting source[@@iterator]"
|
||||
);
|
||||
);
|
||||
|
|
|
@ -38,4 +38,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
sample.slice();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -43,4 +43,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
customCount = 5;
|
||||
result = sample.slice();
|
||||
assert.sameValue(result.length, customCount, "length > count");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -38,4 +38,4 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
assert.throws(TypeError, function() {
|
||||
sample.slice();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -43,4 +43,4 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
customCount = 5;
|
||||
result = sample.slice();
|
||||
assert.sameValue(result.length, customCount, "length > count");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -47,4 +47,4 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
Uint16Array,
|
||||
Uint8Array,
|
||||
Uint8ClampedArray
|
||||
]);
|
||||
]);
|
||||
|
|
|
@ -37,4 +37,4 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
Uint32Array,
|
||||
Uint8Array,
|
||||
Uint8ClampedArray
|
||||
]);
|
||||
]);
|
||||
|
|
|
@ -22,4 +22,4 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
TA.hasOwnProperty("of"), false,
|
||||
"constructor does not define an own property named 'of'"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,4 +22,4 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
TA.hasOwnProperty("of"), false,
|
||||
"constructor does not define an own property named 'of'"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -39,4 +39,4 @@ assert.throws(Test262Error, function() {
|
|||
Reflect.construct(WeakRef, [{}], newTarget);
|
||||
});
|
||||
|
||||
assert.sameValue(calls, 1);
|
||||
assert.sameValue(calls, 1);
|
||||
|
|
|
@ -30,4 +30,4 @@ features: [destructuring-binding]
|
|||
function fna({x}) {}
|
||||
function fnb({x, y}) {}
|
||||
function fnc({x = 42}) {}
|
||||
function fnd({x, y = 42}) {}
|
||||
function fnd({x, y = 42}) {}
|
||||
|
|
|
@ -82,4 +82,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined + 1n;
|
||||
}, 'undefined + 1n throws TypeError');
|
||||
}, 'undefined + 1n throws TypeError');
|
||||
|
|
|
@ -1398,4 +1398,4 @@ assert.sameValue(
|
|||
-0xFEDCBA9876543210n + -0xFEDCBA9876543210n,
|
||||
-0x1FDB97530ECA86420n,
|
||||
'The result of (-0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n + {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n + {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n + {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n + {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(1n + {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 3n, 'The result of (1n + {toString: function() {return 2n;}}) is 3n');
|
||||
}, 3n, 'The result of (1n + {toString: function() {return 2n;}}) is 3n');
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined & 1n;
|
||||
}, 'undefined & 1n throws TypeError');
|
||||
}, 'undefined & 1n throws TypeError');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n & {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n & {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -78,4 +78,4 @@ assert.sameValue(0b011n & {
|
|||
toString: function() {
|
||||
return 0b101n;
|
||||
}
|
||||
}, 0b001n, 'The result of (0b011n & {toString: function() {return 0b101n;}}) is 0b001n');
|
||||
}, 0b001n, 'The result of (0b011n & {toString: function() {return 0b101n;}}) is 0b001n');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n & {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n & {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(3n & {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 2n, 'The result of (3n & {toString: function() {return 2n;}}) is 2n');
|
||||
}, 2n, 'The result of (3n & {toString: function() {return 2n;}}) is 2n');
|
||||
|
|
|
@ -41,4 +41,4 @@ assert.sameValue(~{
|
|||
toString: function() {
|
||||
return 1n;
|
||||
}
|
||||
}, -2n, 'The value of ~{toString: function() {return 1n;}} is -2n');
|
||||
}, -2n, 'The value of ~{toString: function() {return 1n;}} is -2n');
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined | 1n;
|
||||
}, 'undefined | 1n throws TypeError');
|
||||
}, 'undefined | 1n throws TypeError');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n | {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n | {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -79,4 +79,4 @@ assert.sameValue(0b011n | {
|
|||
toString: function() {
|
||||
return 0b101n;
|
||||
}
|
||||
}, 0b111n, 'The result of (0b011n | {toString: function() {return 0b101n;}}) is 0b111n');
|
||||
}, 0b111n, 'The result of (0b011n | {toString: function() {return 0b101n;}}) is 0b111n');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n | {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n | {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(1n | {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 3n, 'The result of (1n | {toString: function() {return 2n;}}) is 3n');
|
||||
}, 3n, 'The result of (1n | {toString: function() {return 2n;}}) is 3n');
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined ^ 1n;
|
||||
}, 'undefined ^ 1n throws TypeError');
|
||||
}, 'undefined ^ 1n throws TypeError');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n ^ {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n ^ {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -79,4 +79,4 @@ assert.sameValue(0b011n ^ {
|
|||
toString: function() {
|
||||
return 0b101n;
|
||||
}
|
||||
}, 0b110n, 'The result of (0b011n ^ {toString: function() {return 0b101n;}}) is 0b110n');
|
||||
}, 0b110n, 'The result of (0b011n ^ {toString: function() {return 0b101n;}}) is 0b110n');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n ^ {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n ^ {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(3n ^ {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 1n, 'The result of (3n ^ {toString: function() {return 2n;}}) is 1n');
|
||||
}, 1n, 'The result of (3n ^ {toString: function() {return 2n;}}) is 1n');
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined / 1n;
|
||||
}, 'undefined / 1n throws TypeError');
|
||||
}, 'undefined / 1n throws TypeError');
|
||||
|
|
|
@ -1067,4 +1067,4 @@ assert.sameValue(
|
|||
-0xFEDCBA9876543210n / -0xFEDCBA9876543210n,
|
||||
0x1n,
|
||||
'The result of (-0xFEDCBA9876543210n / -0xFEDCBA9876543210n) is 0x1n'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -32,4 +32,4 @@ assert.throws(RangeError, function() {
|
|||
|
||||
assert.throws(RangeError, function() {
|
||||
1000000000000000000n / 0n;
|
||||
}, '1000000000000000000n / 0n throws RangeError');
|
||||
}, '1000000000000000000n / 0n throws RangeError');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n / {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n / {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n / {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n / {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(2n / {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 1n, 'The result of (2n / {toString: function() {return 2n;}}) is 1n');
|
||||
}, 1n, 'The result of (2n / {toString: function() {return 2n;}}) is 1n');
|
||||
|
|
|
@ -168,4 +168,4 @@ assert.sameValue(
|
|||
0x100000000n != 0x10000000000000000n,
|
||||
true,
|
||||
'The result of (0x100000000n != 0x10000000000000000n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -28,4 +28,4 @@ assert.sameValue(true != 1n, false, 'The result of (true != 1n) is false');
|
|||
assert.sameValue(2n != false, true, 'The result of (2n != false) is true');
|
||||
assert.sameValue(false != 2n, true, 'The result of (false != 2n) is true');
|
||||
assert.sameValue(2n != true, true, 'The result of (2n != true) is true');
|
||||
assert.sameValue(true != 2n, true, 'The result of (true != 2n) is true');
|
||||
assert.sameValue(true != 2n, true, 'The result of (true != 2n) is true');
|
||||
|
|
|
@ -22,4 +22,4 @@ assert.sameValue(null != 1n, true, 'The result of (null != 1n) is true');
|
|||
assert.sameValue(0n != Symbol('1'), true, 'The result of (0n != Symbol("1")) is true');
|
||||
assert.sameValue(Symbol('1') != 0n, true, 'The result of (Symbol("1") != 0n) is true');
|
||||
assert.sameValue(1n != Symbol('1'), true, 'The result of (1n != Symbol("1")) is true');
|
||||
assert.sameValue(Symbol('1') != 1n, true, 'The result of (Symbol("1") != 1n) is true');
|
||||
assert.sameValue(Symbol('1') != 1n, true, 'The result of (Symbol("1") != 1n) is true');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(NaN != 0n, true, 'The result of (NaN != 0n) is true');
|
|||
assert.sameValue(1n != NaN, true, 'The result of (1n != NaN) is true');
|
||||
assert.sameValue(NaN != 1n, true, 'The result of (NaN != 1n) is true');
|
||||
assert.sameValue(-1n != NaN, true, 'The result of (-1n != NaN) is true');
|
||||
assert.sameValue(NaN != -1n, true, 'The result of (NaN != -1n) is true');
|
||||
assert.sameValue(NaN != -1n, true, 'The result of (NaN != -1n) is true');
|
||||
|
|
|
@ -48,4 +48,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
true,
|
||||
'The result of (Number.MAX_VALUE != 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -38,4 +38,4 @@ assert.sameValue(
|
|||
Number.MIN_VALUE != -10n,
|
||||
true,
|
||||
'The result of (Number.MIN_VALUE != -10n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -131,4 +131,4 @@ assert.sameValue({
|
|||
toString: function() {
|
||||
return '900719925474099102';
|
||||
}
|
||||
} != 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099102";}}) != 900719925474099101n) is true');
|
||||
} != 900719925474099101n, true, 'The result of (({toString: function() {return "900719925474099102";}}) != 900719925474099101n) is true');
|
||||
|
|
|
@ -63,4 +63,4 @@ assert.sameValue(
|
|||
'900719925474099101' != 900719925474099102n,
|
||||
true,
|
||||
'The result of ("900719925474099101" != 900719925474099102n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -168,4 +168,4 @@ assert.sameValue(
|
|||
0x100000000n == 0x10000000000000000n,
|
||||
false,
|
||||
'The result of (0x100000000n == 0x10000000000000000n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -28,4 +28,4 @@ assert.sameValue(true == 1n, true, 'The result of (true == 1n) is true');
|
|||
assert.sameValue(2n == false, false, 'The result of (2n == false) is false');
|
||||
assert.sameValue(false == 2n, false, 'The result of (false == 2n) is false');
|
||||
assert.sameValue(2n == true, false, 'The result of (2n == true) is false');
|
||||
assert.sameValue(true == 2n, false, 'The result of (true == 2n) is false');
|
||||
assert.sameValue(true == 2n, false, 'The result of (true == 2n) is false');
|
||||
|
|
|
@ -21,4 +21,4 @@ assert.sameValue(null == 1n, false, 'The result of (null == 1n) is false');
|
|||
assert.sameValue(0n == Symbol('1'), false, 'The result of (0n == Symbol("1")) is false');
|
||||
assert.sameValue(Symbol('1') == 0n, false, 'The result of (Symbol("1") == 0n) is false');
|
||||
assert.sameValue(1n == Symbol('1'), false, 'The result of (1n == Symbol("1")) is false');
|
||||
assert.sameValue(Symbol('1') == 1n, false, 'The result of (Symbol("1") == 1n) is false');
|
||||
assert.sameValue(Symbol('1') == 1n, false, 'The result of (Symbol("1") == 1n) is false');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(NaN == 0n, false, 'The result of (NaN == 0n) is false');
|
|||
assert.sameValue(1n == NaN, false, 'The result of (1n == NaN) is false');
|
||||
assert.sameValue(NaN == 1n, false, 'The result of (NaN == 1n) is false');
|
||||
assert.sameValue(-1n == NaN, false, 'The result of (-1n == NaN) is false');
|
||||
assert.sameValue(NaN == -1n, false, 'The result of (NaN == -1n) is false');
|
||||
assert.sameValue(NaN == -1n, false, 'The result of (NaN == -1n) is false');
|
||||
|
|
|
@ -58,4 +58,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
false,
|
||||
'The result of (Number.MAX_VALUE == 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -48,4 +48,4 @@ assert.sameValue(
|
|||
Number.MIN_VALUE == -10n,
|
||||
false,
|
||||
'The result of (Number.MIN_VALUE == -10n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -131,4 +131,4 @@ assert.sameValue({
|
|||
toString: function() {
|
||||
return '900719925474099102';
|
||||
}
|
||||
} == 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099102";}}) == 900719925474099101n) is false');
|
||||
} == 900719925474099101n, false, 'The result of (({toString: function() {return "900719925474099102";}}) == 900719925474099101n) is false');
|
||||
|
|
|
@ -63,4 +63,4 @@ assert.sameValue(
|
|||
'900719925474099101' == 900719925474099102n,
|
||||
false,
|
||||
'The result of ("900719925474099101" == 900719925474099102n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined ** 1n;
|
||||
}, 'undefined ** 1n throws TypeError');
|
||||
}, 'undefined ** 1n throws TypeError');
|
||||
|
|
|
@ -72,4 +72,4 @@ assert.sameValue(0x1n ** 0x123n, 0x1n, 'The result of (0x1n ** 0x123n) is 0x1n')
|
|||
assert.sameValue(0x1n ** 0xFFn, 0x1n, 'The result of (0x1n ** 0xFFn) is 0x1n');
|
||||
assert.sameValue(0x1n ** 0x3n, 0x1n, 'The result of (0x1n ** 0x3n) is 0x1n');
|
||||
assert.sameValue(0x1n ** 0x2n, 0x1n, 'The result of (0x1n ** 0x2n) is 0x1n');
|
||||
assert.sameValue(0x1n ** 0x1n, 0x1n, 'The result of (0x1n ** 0x1n) is 0x1n');
|
||||
assert.sameValue(0x1n ** 0x1n, 0x1n, 'The result of (0x1n ** 0x1n) is 0x1n');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n ** {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n ** {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -29,4 +29,4 @@ assert.throws(RangeError, function() {
|
|||
|
||||
assert.throws(RangeError, function() {
|
||||
1n ** -100000000000000000n;
|
||||
}, '1n ** -100000000000000000n throws RangeError');
|
||||
}, '1n ** -100000000000000000n throws RangeError');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n ** {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n ** {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(1n ** {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 1n, 'The result of (1n ** {toString: function() {return 2n;}}) is 1n');
|
||||
}, 1n, 'The result of (1n ** {toString: function() {return 2n;}}) is 1n');
|
||||
|
|
|
@ -17,4 +17,4 @@ info: |
|
|||
...
|
||||
features: [BigInt]
|
||||
---*/
|
||||
assert.sameValue(0n ** 0n, 1n, 'The result of (0n ** 0n) is 1n');
|
||||
assert.sameValue(0n ** 0n, 1n, 'The result of (0n ** 0n) is 1n');
|
||||
|
|
|
@ -161,4 +161,4 @@ assert.sameValue(
|
|||
0x100000000n >= 0x10000000000000000n,
|
||||
false,
|
||||
'The result of (0x100000000n >= 0x10000000000000000n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -24,4 +24,4 @@ assert.sameValue('1z' >= 0n, false, 'The result of ("1z" >= 0n) is false');
|
|||
assert.sameValue('++1' >= 0n, false, 'The result of ("++1" >= 0n) is false');
|
||||
assert.sameValue('--1' >= 0n, false, 'The result of ("--1" >= 0n) is false');
|
||||
assert.sameValue('1e0' >= 0n, false, 'The result of ("1e0" >= 0n) is false');
|
||||
assert.sameValue('Infinity' >= 0n, false, 'The result of ("Infinity" >= 0n) is false');
|
||||
assert.sameValue('Infinity' >= 0n, false, 'The result of ("Infinity" >= 0n) is false');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(-Infinity >= 1n, false, 'The result of (-Infinity >= 1n) is fal
|
|||
assert.sameValue(-1n >= -Infinity, true, 'The result of (-1n >= -Infinity) is true');
|
||||
assert.sameValue(-Infinity >= -1n, false, 'The result of (-Infinity >= -1n) is false');
|
||||
assert.sameValue(0n >= NaN, false, 'The result of (0n >= NaN) is false');
|
||||
assert.sameValue(NaN >= 0n, false, 'The result of (NaN >= 0n) is false');
|
||||
assert.sameValue(NaN >= 0n, false, 'The result of (NaN >= 0n) is false');
|
||||
|
|
|
@ -50,4 +50,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE >= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
false,
|
||||
'The result of (Number.MAX_VALUE >= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -52,4 +52,4 @@ assert.sameValue(
|
|||
Number.MIN_VALUE >= -10n,
|
||||
true,
|
||||
'The result of (Number.MIN_VALUE >= -10n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -48,4 +48,4 @@ assert.sameValue(
|
|||
'-9007199254740992' >= -9007199254740993n,
|
||||
true,
|
||||
'The result of ("-9007199254740992" >= -9007199254740993n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -161,4 +161,4 @@ assert.sameValue(
|
|||
0x100000000n > 0x10000000000000000n,
|
||||
false,
|
||||
'The result of (0x100000000n > 0x10000000000000000n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -18,4 +18,4 @@ assert.sameValue(true > 31n, false, 'The result of (true > 31n) is false');
|
|||
assert.sameValue(-3n > true, false, 'The result of (-3n > true) is false');
|
||||
assert.sameValue(true > -3n, true, 'The result of (true > -3n) is true');
|
||||
assert.sameValue(-3n > false, false, 'The result of (-3n > false) is false');
|
||||
assert.sameValue(false > -3n, true, 'The result of (false > -3n) is true');
|
||||
assert.sameValue(false > -3n, true, 'The result of (false > -3n) is true');
|
||||
|
|
|
@ -24,4 +24,4 @@ assert.sameValue('1z' > 0n, false, 'The result of ("1z" > 0n) is false');
|
|||
assert.sameValue('++1' > 0n, false, 'The result of ("++1" > 0n) is false');
|
||||
assert.sameValue('--1' > 0n, false, 'The result of ("--1" > 0n) is false');
|
||||
assert.sameValue('1e0' > 0n, false, 'The result of ("1e0" > 0n) is false');
|
||||
assert.sameValue('Infinity' > 0n, false, 'The result of ("Infinity" > 0n) is false');
|
||||
assert.sameValue('Infinity' > 0n, false, 'The result of ("Infinity" > 0n) is false');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(-Infinity > 1n, false, 'The result of (-Infinity > 1n) is false
|
|||
assert.sameValue(-1n > -Infinity, true, 'The result of (-1n > -Infinity) is true');
|
||||
assert.sameValue(-Infinity > -1n, false, 'The result of (-Infinity > -1n) is false');
|
||||
assert.sameValue(0n > NaN, false, 'The result of (0n > NaN) is false');
|
||||
assert.sameValue(NaN > 0n, false, 'The result of (NaN > 0n) is false');
|
||||
assert.sameValue(NaN > 0n, false, 'The result of (NaN > 0n) is false');
|
||||
|
|
|
@ -45,4 +45,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
false,
|
||||
'The result of (Number.MAX_VALUE > 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -43,4 +43,4 @@ assert.sameValue(
|
|||
'The result of (-10n > Number.MIN_VALUE) is false'
|
||||
);
|
||||
|
||||
assert.sameValue(Number.MIN_VALUE > -10n, true, 'The result of (Number.MIN_VALUE > -10n) is true');
|
||||
assert.sameValue(Number.MIN_VALUE > -10n, true, 'The result of (Number.MIN_VALUE > -10n) is true');
|
||||
|
|
|
@ -11,4 +11,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Symbol('2') > 3n;
|
||||
}, 'Symbol("2") > 3n throws TypeError');
|
||||
}, 'Symbol("2") > 3n throws TypeError');
|
||||
|
|
|
@ -87,4 +87,4 @@ assert.throws(TypeError, function() {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
undefined << 1n;
|
||||
}, 'undefined << 1n throws TypeError');
|
||||
}, 'undefined << 1n throws TypeError');
|
||||
|
|
|
@ -67,4 +67,4 @@ assert.throws(TypeError, function() {
|
|||
return Symbol('1');
|
||||
}
|
||||
};
|
||||
}, '0n << {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
}, '0n << {toString: function() {return Symbol("1");}} throws TypeError');
|
||||
|
|
|
@ -84,4 +84,4 @@ assert.sameValue({
|
|||
valueOf: function() {
|
||||
return 1n;
|
||||
}
|
||||
}, 0b1010n, 'The result of (({valueOf: function() {return 0b101n;}}) << {valueOf: function() {return 1n;}}) is 0b1010n');
|
||||
}, 0b1010n, 'The result of (({valueOf: function() {return 0b101n;}}) << {valueOf: function() {return 1n;}}) is 0b1010n');
|
||||
|
|
|
@ -369,4 +369,4 @@ assert.throws(TypeError, function() {
|
|||
return {};
|
||||
}
|
||||
};
|
||||
}, '0n << {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
}, '0n << {valueOf: function() {return {};}, toString: function() {return {};}} throws TypeError');
|
||||
|
|
|
@ -42,4 +42,4 @@ assert.sameValue(1n << {
|
|||
toString: function() {
|
||||
return 2n;
|
||||
}
|
||||
}, 4n, 'The result of (1n << {toString: function() {return 2n;}}) is 4n');
|
||||
}, 4n, 'The result of (1n << {toString: function() {return 2n;}}) is 4n');
|
||||
|
|
|
@ -161,4 +161,4 @@ assert.sameValue(
|
|||
0x100000000n <= 0x10000000000000000n,
|
||||
true,
|
||||
'The result of (0x100000000n <= 0x10000000000000000n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -24,4 +24,4 @@ assert.sameValue(0n <= '1z', false, 'The result of (0n <= "1z") is false');
|
|||
assert.sameValue(0n <= '++1', false, 'The result of (0n <= "++1") is false');
|
||||
assert.sameValue(0n <= '--1', false, 'The result of (0n <= "--1") is false');
|
||||
assert.sameValue(0n <= '1e0', false, 'The result of (0n <= "1e0") is false');
|
||||
assert.sameValue(0n <= 'Infinity', false, 'The result of (0n <= "Infinity") is false');
|
||||
assert.sameValue(0n <= 'Infinity', false, 'The result of (0n <= "Infinity") is false');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(-Infinity <= 1n, true, 'The result of (-Infinity <= 1n) is true
|
|||
assert.sameValue(-1n <= -Infinity, false, 'The result of (-1n <= -Infinity) is false');
|
||||
assert.sameValue(-Infinity <= -1n, true, 'The result of (-Infinity <= -1n) is true');
|
||||
assert.sameValue(0n <= NaN, false, 'The result of (0n <= NaN) is false');
|
||||
assert.sameValue(NaN <= 0n, false, 'The result of (NaN <= 0n) is false');
|
||||
assert.sameValue(NaN <= 0n, false, 'The result of (NaN <= 0n) is false');
|
||||
|
|
|
@ -51,4 +51,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE <= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
true,
|
||||
'The result of (Number.MAX_VALUE <= 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -53,4 +53,4 @@ assert.sameValue(
|
|||
Number.MIN_VALUE <= -10n,
|
||||
false,
|
||||
'The result of (Number.MIN_VALUE <= -10n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -48,4 +48,4 @@ assert.sameValue(
|
|||
'-9007199254740992' <= -9007199254740993n,
|
||||
false,
|
||||
'The result of ("-9007199254740992" <= -9007199254740993n) is false'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -161,4 +161,4 @@ assert.sameValue(
|
|||
0x100000000n < 0x10000000000000000n,
|
||||
true,
|
||||
'The result of (0x100000000n < 0x10000000000000000n) is true'
|
||||
);
|
||||
);
|
||||
|
|
|
@ -18,4 +18,4 @@ assert.sameValue(true < 31n, true, 'The result of (true < 31n) is true');
|
|||
assert.sameValue(-3n < true, true, 'The result of (-3n < true) is true');
|
||||
assert.sameValue(true < -3n, false, 'The result of (true < -3n) is false');
|
||||
assert.sameValue(-3n < false, true, 'The result of (-3n < false) is true');
|
||||
assert.sameValue(false < -3n, false, 'The result of (false < -3n) is false');
|
||||
assert.sameValue(false < -3n, false, 'The result of (false < -3n) is false');
|
||||
|
|
|
@ -24,4 +24,4 @@ assert.sameValue(0n < '1z', false, 'The result of (0n < "1z") is false');
|
|||
assert.sameValue(0n < '++1', false, 'The result of (0n < "++1") is false');
|
||||
assert.sameValue(0n < '--1', false, 'The result of (0n < "--1") is false');
|
||||
assert.sameValue(0n < '1e0', false, 'The result of (0n < "1e0") is false');
|
||||
assert.sameValue(0n < 'Infinity', false, 'The result of (0n < "Infinity") is false');
|
||||
assert.sameValue(0n < 'Infinity', false, 'The result of (0n < "Infinity") is false');
|
||||
|
|
|
@ -26,4 +26,4 @@ assert.sameValue(-Infinity < 1n, true, 'The result of (-Infinity < 1n) is true')
|
|||
assert.sameValue(-1n < -Infinity, false, 'The result of (-1n < -Infinity) is false');
|
||||
assert.sameValue(-Infinity < -1n, true, 'The result of (-Infinity < -1n) is true');
|
||||
assert.sameValue(0n < NaN, false, 'The result of (0n < NaN) is false');
|
||||
assert.sameValue(NaN < 0n, false, 'The result of (NaN < 0n) is false');
|
||||
assert.sameValue(NaN < 0n, false, 'The result of (NaN < 0n) is false');
|
||||
|
|
|
@ -45,4 +45,4 @@ assert.sameValue(
|
|||
Number.MAX_VALUE < 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,
|
||||
true,
|
||||
'The result of (Number.MAX_VALUE < 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n) is true'
|
||||
);
|
||||
);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue