mirror of https://github.com/tc39/test262.git
remove some auto-generated error messages in "assert.throws" tests
This commit is contained in:
parent
5424d7e834
commit
961480ac61
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
let date = new Date(Date.now()); new date.getYear();
|
||||
}, '`let date = new Date(Date.now()); new date.getYear()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
let date = new Date(Date.now()); new date.setYear();
|
||||
}, '`let date = new Date(Date.now()); new date.setYear()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
let date = new Date(Date.now()); new date.toGMTString();
|
||||
}, '`let date = new Date(Date.now()); new date.toGMTString()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@ assert.throws(
|
|||
TypeError,
|
||||
function () {
|
||||
RegExp.prototype.compile.call(otherRealm_regexp);
|
||||
},
|
||||
"`RegExp.prototype.compile.call(otherRealm_regexp)` throws TypeError"
|
||||
);
|
||||
});
|
||||
|
||||
assert.throws(
|
||||
other.TypeError,
|
||||
|
|
|
@ -12,14 +12,10 @@ assert.throws(
|
|||
TypeError,
|
||||
function () {
|
||||
subclass_regexp.compile();
|
||||
},
|
||||
"`subclass_regexp.compile()` throws TypeError"
|
||||
);
|
||||
});
|
||||
|
||||
assert.throws(
|
||||
TypeError,
|
||||
function () {
|
||||
RegExp.prototype.compile.call(subclass_regexp);
|
||||
},
|
||||
"`RegExp.prototype.compile.call(subclass_regexp)` throws TypeError"
|
||||
);
|
||||
});
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.anchor();
|
||||
}, '`new String.prototype.anchor()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.big), false, 'isConstructor(Stri
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.big();
|
||||
}, '`new String.prototype.big()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.blink();
|
||||
}, '`new String.prototype.blink()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.bold();
|
||||
}, '`new String.prototype.bold()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.fixed();
|
||||
}, '`new String.prototype.fixed()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.fontcolor();
|
||||
}, '`new String.prototype.fontcolor()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.fontsize();
|
||||
}, '`new String.prototype.fontsize()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.italics();
|
||||
}, '`new String.prototype.italics()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.link();
|
||||
}, '`new String.prototype.link()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.small();
|
||||
}, '`new String.prototype.small()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.strike();
|
||||
}, '`new String.prototype.strike()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.sub), false, 'isConstructor(Stri
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.sub();
|
||||
}, '`new String.prototype.sub()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -28,5 +28,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.substr();
|
||||
}, '`new String.prototype.substr()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.sup), false, 'isConstructor(Stri
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new String.prototype.sup();
|
||||
}, '`new String.prototype.sup()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ assert.sameValue(isConstructor(escape), false, 'isConstructor(escape) must retur
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new escape('');
|
||||
}, '`new escape(\'\')` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ assert.sameValue(isConstructor(unescape), false, 'isConstructor(unescape) must r
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new unescape('');
|
||||
}, '`new unescape(\'\')` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype[Symbol.iterator]();
|
||||
}, '`new Array.prototype[Symbol.iterator]()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.copyWithin();
|
||||
}, '`new Array.prototype.copyWithin()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.entries();
|
||||
}, '`new Array.prototype.entries()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.every(() => {});
|
||||
}, '`new Array.prototype.every(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.fill), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.fill();
|
||||
}, '`new Array.prototype.fill()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.filter(() => {});
|
||||
}, '`new Array.prototype.filter(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.find), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.find(() => {});
|
||||
}, '`new Array.prototype.find(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.findIndex(() => {});
|
||||
}, '`new Array.prototype.findIndex(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.findLast), false, 'isConstructor(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.findLast(() => {});
|
||||
}, '`new Array.prototype.findLast(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.findLastIndex(() => {});
|
||||
}, '`new Array.prototype.findLastIndex(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.flat), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.flat();
|
||||
}, '`new Array.prototype.flat()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.flatMap(() => {});
|
||||
}, '`new Array.prototype.flatMap(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.forEach(() => {});
|
||||
}, '`new Array.prototype.forEach(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.includes(1);
|
||||
}, '`new Array.prototype.includes(1)` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.indexOf();
|
||||
}, '`new Array.prototype.indexOf()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.join), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.join();
|
||||
}, '`new Array.prototype.join()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.keys), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.keys();
|
||||
}, '`new Array.prototype.keys()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.lastIndexOf();
|
||||
}, '`new Array.prototype.lastIndexOf()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.map), false, 'isConstructor(Array
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.map(() => {});
|
||||
}, '`new Array.prototype.map(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.pop), false, 'isConstructor(Array
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.pop();
|
||||
}, '`new Array.prototype.pop()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.push), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.push();
|
||||
}, '`new Array.prototype.push()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.reduce(() => {}, []);
|
||||
}, '`new Array.prototype.reduce(() => {}, [])` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.reduceRight(() => {}, []);
|
||||
}, '`new Array.prototype.reduceRight(() => {}, [])` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.reverse();
|
||||
}, '`new Array.prototype.reverse()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.shift();
|
||||
}, '`new Array.prototype.shift()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.slice();
|
||||
}, '`new Array.prototype.slice()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.some), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.some(() => {});
|
||||
}, '`new Array.prototype.some(() => {})` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.sort), false, 'isConstructor(Arra
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.sort();
|
||||
}, '`new Array.prototype.sort()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.splice();
|
||||
}, '`new Array.prototype.splice()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toLocaleString();
|
||||
}, '`new Array.prototype.toLocaleString()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toReversed();
|
||||
}, '`new Array.prototype.toReversed()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ features: [change-array-by-copy]
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.toReversed.call(null);
|
||||
}, '`Array.prototype.toReversed.call(null)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.toReversed.call(undefined);
|
||||
}, '`Array.prototype.toReversed.call(undefined)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toSorted();
|
||||
}, '`new Array.prototype.toSorted()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ features: [change-array-by-copy]
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.toSorted.call(null);
|
||||
}, '`Array.prototype.toSorted.call(null)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.toSorted.call(undefined);
|
||||
}, '`Array.prototype.toSorted.call(undefined)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -29,4 +29,4 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toSpliced();
|
||||
}, '`new Array.prototype.toSpliced()` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.toString();
|
||||
}, '`new Array.prototype.toString()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.unshift();
|
||||
}, '`new Array.prototype.unshift()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.values();
|
||||
}, '`new Array.prototype.values()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Array.prototype.with();
|
||||
}, '`new Array.prototype.with()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ features: [change-array-by-copy]
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.with.call(null, 0, 0);
|
||||
}, '`Array.prototype.with.call(null, 0, 0)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, () => {
|
||||
Array.prototype.with.call(undefined, 0, 0);
|
||||
}, '`Array.prototype.with.call(undefined, 0, 0)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(ArrayBuffer.isView), false, 'isConstructor(ArrayB
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new ArrayBuffer.isView();
|
||||
}, '`new ArrayBuffer.isView()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
let ab = new ArrayBuffer(); new ab.slice();
|
||||
}, '`let ab = new ArrayBuffer(); new ab.slice()` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.add(view, IdxGen(view), 10);
|
||||
}, '`Atomics.add(view, IdxGen(view), 10)` throws RangeError');
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -15,6 +15,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.add(view, IdxGen(view), 10n);
|
||||
}, '`Atomics.add(view, IdxGen(view), 10n)` throws RangeError');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(view) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.add(view, 0, 0);
|
||||
}, '`Atomics.add(view, 0, 0)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Atomics.add), false, 'isConstructor(Atomics.add)
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.add(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.add(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.and(view, IdxGen(view), 10);
|
||||
}, '`Atomics.and(view, IdxGen(view), 10)` throws RangeError');
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -15,6 +15,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.and(view, IdxGen(view), 10n);
|
||||
}, '`Atomics.and(view, IdxGen(view), 10n)` throws RangeError');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(view) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.and(view, 0, 0);
|
||||
}, '`Atomics.and(view, 0, 0)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Atomics.and), false, 'isConstructor(Atomics.and)
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.and(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.and(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.compareExchange(view, IdxGen(view), 10, 0);
|
||||
}, '`Atomics.compareExchange(view, IdxGen(view), 10, 0)` throws RangeError');
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -15,6 +15,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.compareExchange(view, IdxGen(view), 10, 0n);
|
||||
}, '`Atomics.compareExchange(view, IdxGen(view), 10, 0n)` throws RangeError');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(view) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.compareExchange(view, 0, 0, 0);
|
||||
}, '`Atomics.compareExchange(view, 0, 0, 0)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -29,5 +29,5 @@ assert.sameValue(
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.compareExchange(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.compareExchange(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.exchange(view, IdxGen(view), 10, 0);
|
||||
}, '`Atomics.exchange(view, IdxGen(view), 10, 0)` throws RangeError');
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -15,6 +15,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.exchange(view, IdxGen(view), 10n, 0n);
|
||||
}, '`Atomics.exchange(view, IdxGen(view), 10n, 0n)` throws RangeError');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(view) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.exchange(view, 0, 0);
|
||||
}, '`Atomics.exchange(view, 0, 0)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Atomics.exchange), false, 'isConstructor(Atomics.
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.exchange(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.exchange(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Atomics.isLockFree), false, 'isConstructor(Atomic
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.isLockFree(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.isLockFree(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -17,6 +17,6 @@ testWithTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.load(view, IdxGen(view));
|
||||
}, '`Atomics.load(view, IdxGen(view))` throws RangeError');
|
||||
});
|
||||
});
|
||||
}, views);
|
||||
|
|
|
@ -16,6 +16,6 @@ testWithBigIntTypedArrayConstructors(function(TA) {
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.load(view, IdxGen(view));
|
||||
}, '`Atomics.load(view, IdxGen(view))` throws RangeError');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(view) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.load(view, 0);
|
||||
}, '`Atomics.load(view, 0)` throws TypeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Atomics.load), false, 'isConstructor(Atomics.load
|
|||
|
||||
assert.throws(TypeError, () => {
|
||||
new Atomics.load(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)));
|
||||
}, '`new Atomics.load(new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT)))` throws TypeError');
|
||||
});
|
||||
|
||||
|
|
|
@ -22,5 +22,5 @@ const i32a = new Int32Array(
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i32a, IdxGen(i32a), 0);
|
||||
}, '`Atomics.notify(i32a, IdxGen(i32a), 0)` throws RangeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -22,5 +22,5 @@ const i64a = new BigInt64Array(
|
|||
testWithAtomicsOutOfBoundsIndices(function(IdxGen) {
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i64a, IdxGen(i64a), 0);
|
||||
}, '`Atomics.notify(i64a, IdxGen(i64a), 0)` throws RangeError');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -27,8 +27,8 @@ const poisoned = {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.wait(i64a, 0, 0);
|
||||
}, '`Atomics.wait(i64a, 0, 0)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.wait(i64a, poisoned, poisoned);
|
||||
}, '`Atomics.wait(i64a, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -30,4 +30,4 @@ const poisoned = {
|
|||
|
||||
assert.throws(Test262Error, function() {
|
||||
Atomics.notify(i64a, poisoned, 0);
|
||||
}, '`Atomics.notify(i64a, poisoned, 0)` throws Test262Error');
|
||||
});
|
||||
|
|
|
@ -27,6 +27,6 @@ const poisoned = {
|
|||
|
||||
assert.throws(Test262Error, function() {
|
||||
Atomics.notify(i64a, 0, poisoned);
|
||||
}, '`Atomics.notify(i64a, 0, poisoned)` throws Test262Error');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -18,4 +18,4 @@ const poisoned = {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new BigUint64Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new BigUint64Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -33,4 +33,4 @@ try {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(i64a, poisoned, poisoned);
|
||||
}, '`Atomics.notify(i64a, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -23,4 +23,4 @@ const i32a = new Int32Array(
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(i32a, 0, Symbol());
|
||||
}, '`Atomics.notify(i32a, 0, Symbol())` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -29,4 +29,4 @@ const poisoned = {
|
|||
|
||||
assert.throws(Test262Error, function() {
|
||||
Atomics.notify(i32a, 0, poisoned);
|
||||
}, '`Atomics.notify(i32a, 0, poisoned)` throws Test262Error');
|
||||
});
|
||||
|
|
|
@ -28,13 +28,13 @@ const poisoned = {
|
|||
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i32a, -Infinity, poisoned);
|
||||
}, '`Atomics.notify(i32a, -Infinity, poisoned)` throws RangeError');
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i32a, -7.999, poisoned);
|
||||
}, '`Atomics.notify(i32a, -7.999, poisoned)` throws RangeError');
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i32a, -1, poisoned);
|
||||
}, '`Atomics.notify(i32a, -1, poisoned)` throws RangeError');
|
||||
});
|
||||
assert.throws(RangeError, function() {
|
||||
Atomics.notify(i32a, -300, poisoned);
|
||||
}, '`Atomics.notify(i32a, -300, poisoned)` throws RangeError');
|
||||
});
|
||||
|
|
|
@ -26,14 +26,14 @@ assert.throws(TypeError, function() {
|
|||
new SharedArrayBuffer(Float64Array.BYTES_PER_ELEMENT * 8)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Float64Array( new SharedArrayBuffer(Float64Array.BYTES_PER_ELEMENT * 8) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Float32Array(
|
||||
new SharedArrayBuffer(Float32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Float32Array( new SharedArrayBuffer(Float32Array.BYTES_PER_ELEMENT * 4) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
if (typeof Float16Array !== 'undefined') {
|
||||
assert.throws(TypeError, function() {
|
||||
|
@ -41,7 +41,7 @@ if (typeof Float16Array !== 'undefined') {
|
|||
new SharedArrayBuffer(Float16Array.BYTES_PER_ELEMENT * 2)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Float16Array( new SharedArrayBuffer(Float16Array.BYTES_PER_ELEMENT * 2) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
|
@ -49,39 +49,39 @@ assert.throws(TypeError, function() {
|
|||
new SharedArrayBuffer(Int16Array.BYTES_PER_ELEMENT * 2)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Int16Array( new SharedArrayBuffer(Int16Array.BYTES_PER_ELEMENT * 2) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Int8Array(
|
||||
new SharedArrayBuffer(Int8Array.BYTES_PER_ELEMENT)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Int8Array( new SharedArrayBuffer(Int8Array.BYTES_PER_ELEMENT) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Uint32Array(
|
||||
new SharedArrayBuffer(Uint32Array.BYTES_PER_ELEMENT * 4)
|
||||
);
|
||||
Atomics.notify(new Uint32Array(), poisoned, poisoned);
|
||||
}, '`const view = new Uint32Array( new SharedArrayBuffer(Uint32Array.BYTES_PER_ELEMENT * 4) ); Atomics.notify(new Uint32Array(), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Uint16Array(
|
||||
new SharedArrayBuffer(Uint16Array.BYTES_PER_ELEMENT * 2)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Uint16Array( new SharedArrayBuffer(Uint16Array.BYTES_PER_ELEMENT * 2) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Uint8Array(
|
||||
new SharedArrayBuffer(Uint8Array.BYTES_PER_ELEMENT)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Uint8Array( new SharedArrayBuffer(Uint8Array.BYTES_PER_ELEMENT) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
const view = new Uint8ClampedArray(
|
||||
new SharedArrayBuffer(Uint8ClampedArray.BYTES_PER_ELEMENT)
|
||||
);
|
||||
Atomics.notify(view, poisoned, poisoned);
|
||||
}, '`const view = new Uint8ClampedArray( new SharedArrayBuffer(Uint8ClampedArray.BYTES_PER_ELEMENT) ); Atomics.notify(view, poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -31,6 +31,6 @@ const poisoned = {
|
|||
|
||||
assert.throws(Test262Error, function() {
|
||||
Atomics.notify(i32a, 0, poisoned);
|
||||
}, '`Atomics.notify(i32a, 0, poisoned)` throws Test262Error');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,6 @@ const poisoned = {
|
|||
|
||||
assert.throws(Test262Error, function() {
|
||||
Atomics.notify(i32a, poisoned, 0);
|
||||
}, '`Atomics.notify(i32a, poisoned, 0)` throws Test262Error');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -18,24 +18,24 @@ const poisoned = {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Int16Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Int16Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Int8Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Int8Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint32Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint32Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint16Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint16Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint8Array(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint8Array(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint8ClampedArray(nonsab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint8ClampedArray(nonsab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -18,24 +18,24 @@ const poisoned = {
|
|||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Int16Array(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Int16Array(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Int8Array(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Int8Array(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint32Array(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint32Array(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint16Array(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint16Array(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint8Array(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint8Array(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(new Uint8ClampedArray(sab), poisoned, poisoned);
|
||||
}, '`Atomics.notify(new Uint8ClampedArray(sab), poisoned, poisoned)` throws TypeError');
|
||||
});
|
||||
|
|
|
@ -12,5 +12,5 @@ features: [ArrayBuffer, Atomics, DataView, SharedArrayBuffer, Symbol, TypedArray
|
|||
testWithAtomicsNonViewValues(function(nonView) {
|
||||
assert.throws(TypeError, function() {
|
||||
Atomics.notify(nonView, 0, 0);
|
||||
}, '`Atomics.notify(nonView, 0, 0)` throws TypeError'); // Even with count == 0
|
||||
}); // Even with count == 0
|
||||
});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue