From 7389389071f408a2ee5292b0987fb7ffa6417e89 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 18 May 2018 15:00:10 -0400 Subject: [PATCH] Atomics: use regular functions --- test/built-ins/Atomics/add/bad-range.js | 8 +++----- test/built-ins/Atomics/add/bigint/bad-range.js | 8 +++----- .../Atomics/add/bigint/nonshared-int-views.js | 8 +++----- test/built-ins/Atomics/add/non-views.js | 8 +++----- .../built-ins/Atomics/add/nonshared-int-views.js | 8 +++----- .../built-ins/Atomics/add/shared-nonint-views.js | 8 +++----- test/built-ins/Atomics/and/bad-range.js | 8 +++----- test/built-ins/Atomics/and/bigint/bad-range.js | 8 +++----- .../Atomics/and/bigint/nonshared-int-views.js | 8 +++----- test/built-ins/Atomics/and/non-views.js | 8 +++----- .../built-ins/Atomics/and/nonshared-int-views.js | 8 +++----- .../built-ins/Atomics/and/shared-nonint-views.js | 8 +++----- .../Atomics/compareExchange/bad-range.js | 8 +++----- .../Atomics/compareExchange/bigint/bad-range.js | 8 +++----- .../bigint/nonshared-int-views.js | 8 +++----- .../Atomics/compareExchange/non-views.js | 8 +++----- .../compareExchange/nonshared-int-views.js | 8 +++----- .../compareExchange/shared-nonint-views.js | 8 +++----- test/built-ins/Atomics/exchange/bad-range.js | 8 +++----- .../Atomics/exchange/bigint/bad-range.js | 8 +++----- .../exchange/bigint/nonshared-int-views.js | 8 +++----- test/built-ins/Atomics/exchange/non-views.js | 8 +++----- .../Atomics/exchange/nonshared-int-views.js | 8 +++----- .../Atomics/exchange/shared-nonint-views.js | 8 +++----- test/built-ins/Atomics/load/bad-range.js | 4 +++- test/built-ins/Atomics/load/bigint/bad-range.js | 4 +++- .../Atomics/load/bigint/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/load/non-views.js | 4 +++- .../Atomics/load/nonshared-int-views.js | 4 +++- .../Atomics/load/shared-nonint-views.js | 4 +++- test/built-ins/Atomics/or/bad-range.js | 4 +++- test/built-ins/Atomics/or/bigint/bad-range.js | 4 +++- .../Atomics/or/bigint/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/or/non-views.js | 4 +++- test/built-ins/Atomics/or/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/or/shared-nonint-views.js | 4 +++- test/built-ins/Atomics/store/bad-range.js | 4 +++- test/built-ins/Atomics/store/bigint/bad-range.js | 4 +++- .../Atomics/store/bigint/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/store/non-views.js | 4 +++- .../Atomics/store/nonshared-int-views.js | 4 +++- .../Atomics/store/shared-nonint-views.js | 4 +++- test/built-ins/Atomics/sub/bad-range.js | 4 +++- test/built-ins/Atomics/sub/bigint/bad-range.js | 4 +++- .../Atomics/sub/bigint/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/sub/non-views.js | 4 +++- .../built-ins/Atomics/sub/nonshared-int-views.js | 4 +++- .../built-ins/Atomics/sub/shared-nonint-views.js | 4 +++- test/built-ins/Atomics/wait/bad-range.js | 4 +++- test/built-ins/Atomics/wait/bigint/bad-range.js | 4 +++- test/built-ins/Atomics/wake/bad-range.js | 4 +++- test/built-ins/Atomics/wake/bigint/bad-range.js | 4 +++- .../Atomics/wake/negative-index-throws.js | 16 ++++++++++++---- test/built-ins/Atomics/wake/non-views.js | 4 +++- .../Atomics/wake/nonshared-int-views.js | 4 +++- .../Atomics/wake/shared-nonint-views.js | 4 +++- test/built-ins/Atomics/xor/bad-range.js | 4 +++- test/built-ins/Atomics/xor/bigint/bad-range.js | 4 +++- .../Atomics/xor/bigint/nonshared-int-views.js | 4 +++- test/built-ins/Atomics/xor/non-views.js | 4 +++- .../built-ins/Atomics/xor/nonshared-int-views.js | 4 +++- .../built-ins/Atomics/xor/shared-nonint-views.js | 4 +++- 62 files changed, 195 insertions(+), 161 deletions(-) diff --git a/test/built-ins/Atomics/add/bad-range.js b/test/built-ins/Atomics/add/bad-range.js index e220affe3a..cfac2ccb86 100644 --- a/test/built-ins/Atomics/add/bad-range.js +++ b/test/built-ins/Atomics/add/bad-range.js @@ -15,10 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.add(view, IdxGen(view), 10), - 'Atomics.add(view, IdxGen(view), 10) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.add(view, IdxGen(view), 10); + }, 'Atomics.add(view, IdxGen(view), 10) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/add/bigint/bad-range.js b/test/built-ins/Atomics/add/bigint/bad-range.js index 2cb1260dde..ad275c9696 100644 --- a/test/built-ins/Atomics/add/bigint/bad-range.js +++ b/test/built-ins/Atomics/add/bigint/bad-range.js @@ -14,10 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.add(view, IdxGen(view), 10), - 'Atomics.add(view, IdxGen(view), 10) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.add(view, IdxGen(view), 10); + }, 'Atomics.add(view, IdxGen(view), 10) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/add/bigint/nonshared-int-views.js b/test/built-ins/Atomics/add/bigint/nonshared-int-views.js index 033e733168..72d796fd2e 100644 --- a/test/built-ins/Atomics/add/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/add/bigint/nonshared-int-views.js @@ -12,9 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var ab = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.add(new TA(ab), 0, 0), - 'Atomics.add(new TA(ab), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.add(new TA(ab), 0, 0); + }, 'Atomics.add(new TA(ab), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/add/non-views.js b/test/built-ins/Atomics/add/non-views.js index 5eece9cb81..82711c52ab 100644 --- a/test/built-ins/Atomics/add/non-views.js +++ b/test/built-ins/Atomics/add/non-views.js @@ -10,9 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws( - TypeError, - () => Atomics.add(view, 0, 0), - 'Atomics.add(view, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.add(view, 0, 0); + }, 'Atomics.add(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/add/nonshared-int-views.js b/test/built-ins/Atomics/add/nonshared-int-views.js index 441b422ecc..b09f1b7c2f 100644 --- a/test/built-ins/Atomics/add/nonshared-int-views.js +++ b/test/built-ins/Atomics/add/nonshared-int-views.js @@ -13,9 +13,7 @@ var ab = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.add(new TA(ab), 0, 0), - 'Atomics.add(new TA(ab), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.add(new TA(ab), 0, 0); + }, 'Atomics.add(new TA(ab), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/add/shared-nonint-views.js b/test/built-ins/Atomics/add/shared-nonint-views.js index 82fdfe8449..505ea511c3 100644 --- a/test/built-ins/Atomics/add/shared-nonint-views.js +++ b/test/built-ins/Atomics/add/shared-nonint-views.js @@ -12,9 +12,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.add(new TA(buffer), 0, 0), - 'Atomics.add(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.add(new TA(buffer), 0, 0); + }, 'Atomics.add(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/and/bad-range.js b/test/built-ins/Atomics/and/bad-range.js index e01b6def7f..f81a25df22 100644 --- a/test/built-ins/Atomics/and/bad-range.js +++ b/test/built-ins/Atomics/and/bad-range.js @@ -15,10 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.and(view, IdxGen(view), 10), - 'Atomics.and(view, IdxGen(view), 10) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.and(view, IdxGen(view), 10); + }, 'Atomics.and(view, IdxGen(view), 10) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/and/bigint/bad-range.js b/test/built-ins/Atomics/and/bigint/bad-range.js index 8e320065bc..5f72a1945b 100644 --- a/test/built-ins/Atomics/and/bigint/bad-range.js +++ b/test/built-ins/Atomics/and/bigint/bad-range.js @@ -14,10 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.and(view, IdxGen(view), 10), - 'Atomics.and(view, IdxGen(view), 10) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.and(view, IdxGen(view), 10); + }, 'Atomics.and(view, IdxGen(view), 10) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/and/bigint/nonshared-int-views.js b/test/built-ins/Atomics/and/bigint/nonshared-int-views.js index 5005574664..17b270dc23 100644 --- a/test/built-ins/Atomics/and/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/and/bigint/nonshared-int-views.js @@ -12,9 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.and(new TA(buffer), 0, 0), - 'Atomics.and(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.and(new TA(buffer), 0, 0); + }, 'Atomics.and(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/and/non-views.js b/test/built-ins/Atomics/and/non-views.js index 83cdd79add..45544aee28 100644 --- a/test/built-ins/Atomics/and/non-views.js +++ b/test/built-ins/Atomics/and/non-views.js @@ -10,9 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws( - TypeError, - () => Atomics.and(view, 0, 0), - 'Atomics.and(view, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.and(view, 0, 0); + }, 'Atomics.and(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/and/nonshared-int-views.js b/test/built-ins/Atomics/and/nonshared-int-views.js index f588fb7bb7..b578f411ac 100644 --- a/test/built-ins/Atomics/and/nonshared-int-views.js +++ b/test/built-ins/Atomics/and/nonshared-int-views.js @@ -13,9 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.and(new TA(buffer), 0, 0), - 'Atomics.and(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.and(new TA(buffer), 0, 0); + }, 'Atomics.and(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/and/shared-nonint-views.js b/test/built-ins/Atomics/and/shared-nonint-views.js index 05d57616cf..3dbd81b3b8 100644 --- a/test/built-ins/Atomics/and/shared-nonint-views.js +++ b/test/built-ins/Atomics/and/shared-nonint-views.js @@ -12,9 +12,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.and(new TA(buffer), 0, 0), - 'Atomics.and(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.and(new TA(buffer), 0, 0); + }, 'Atomics.and(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/compareExchange/bad-range.js b/test/built-ins/Atomics/compareExchange/bad-range.js index d43a2d66ac..8bac9a2f0b 100644 --- a/test/built-ins/Atomics/compareExchange/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bad-range.js @@ -15,10 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.compareExchange(view, IdxGen(view), 10, 0), - 'Atomics.compareExchange(view, IdxGen(view), 10, 0) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.compareExchange(view, IdxGen(view), 10, 0); + }, 'Atomics.compareExchange(view, IdxGen(view), 10, 0) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js index 1b302f1676..fa314956cb 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/compareExchange/bigint/bad-range.js @@ -14,10 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.compareExchange(view, IdxGen(view), 10, 0), - 'Atomics.compareExchange(view, IdxGen(view), 10, 0) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.compareExchange(view, IdxGen(view), 10, 0); + }, 'Atomics.compareExchange(view, IdxGen(view), 10, 0) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/compareExchange/bigint/nonshared-int-views.js b/test/built-ins/Atomics/compareExchange/bigint/nonshared-int-views.js index 083fb0bf6b..5efe40c8e6 100644 --- a/test/built-ins/Atomics/compareExchange/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/compareExchange/bigint/nonshared-int-views.js @@ -12,9 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.compareExchange(new TA(buffer), 0, 0, 0), - 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.compareExchange(new TA(buffer), 0, 0, 0); + }, 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/compareExchange/non-views.js b/test/built-ins/Atomics/compareExchange/non-views.js index 2f073adf06..2f49a21c90 100644 --- a/test/built-ins/Atomics/compareExchange/non-views.js +++ b/test/built-ins/Atomics/compareExchange/non-views.js @@ -10,9 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws( - TypeError, - () => Atomics.compareExchange(view, 0, 0, 0), - 'Atomics.compareExchange(view, 0, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.compareExchange(view, 0, 0, 0); + }, 'Atomics.compareExchange(view, 0, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/compareExchange/nonshared-int-views.js b/test/built-ins/Atomics/compareExchange/nonshared-int-views.js index e021e00301..d1477aa0be 100644 --- a/test/built-ins/Atomics/compareExchange/nonshared-int-views.js +++ b/test/built-ins/Atomics/compareExchange/nonshared-int-views.js @@ -13,9 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.compareExchange(new TA(buffer), 0, 0, 0), - 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.compareExchange(new TA(buffer), 0, 0, 0); + }, 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/compareExchange/shared-nonint-views.js b/test/built-ins/Atomics/compareExchange/shared-nonint-views.js index 6fac3bf5a6..3160bc4419 100644 --- a/test/built-ins/Atomics/compareExchange/shared-nonint-views.js +++ b/test/built-ins/Atomics/compareExchange/shared-nonint-views.js @@ -12,9 +12,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.compareExchange(new TA(buffer), 0, 0, 0), - 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.compareExchange(new TA(buffer), 0, 0, 0); + }, 'Atomics.compareExchange(new TA(buffer), 0, 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/exchange/bad-range.js b/test/built-ins/Atomics/exchange/bad-range.js index 5073f7ab73..2723e699e8 100644 --- a/test/built-ins/Atomics/exchange/bad-range.js +++ b/test/built-ins/Atomics/exchange/bad-range.js @@ -15,10 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.exchange(view, IdxGen(view), 10, 0), - 'Atomics.exchange(view, IdxGen(view), 10, 0) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.exchange(view, IdxGen(view), 10, 0); + }, 'Atomics.exchange(view, IdxGen(view), 10, 0) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/exchange/bigint/bad-range.js b/test/built-ins/Atomics/exchange/bigint/bad-range.js index dd0599c033..cab5f3bd59 100644 --- a/test/built-ins/Atomics/exchange/bigint/bad-range.js +++ b/test/built-ins/Atomics/exchange/bigint/bad-range.js @@ -14,10 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws( - RangeError, - () => Atomics.exchange(view, IdxGen(view), 10, 0), - 'Atomics.exchange(view, IdxGen(view), 10, 0) throws RangeError' - ); + assert.throws(RangeError, function() { + Atomics.exchange(view, IdxGen(view), 10, 0); + }, 'Atomics.exchange(view, IdxGen(view), 10, 0) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/exchange/bigint/nonshared-int-views.js b/test/built-ins/Atomics/exchange/bigint/nonshared-int-views.js index 5f70fa85c8..8a2d2a8259 100644 --- a/test/built-ins/Atomics/exchange/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/exchange/bigint/nonshared-int-views.js @@ -12,9 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.exchange(new TA(buffer), 0, 0), - 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.exchange(new TA(buffer), 0, 0); + }, 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/exchange/non-views.js b/test/built-ins/Atomics/exchange/non-views.js index cedc446103..02a899ec4f 100644 --- a/test/built-ins/Atomics/exchange/non-views.js +++ b/test/built-ins/Atomics/exchange/non-views.js @@ -10,9 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws( - TypeError, - () => Atomics.exchange(view, 0, 0), - 'Atomics.exchange(view, 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.exchange(view, 0, 0); + }, 'Atomics.exchange(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/exchange/nonshared-int-views.js b/test/built-ins/Atomics/exchange/nonshared-int-views.js index 937d5cff5c..8de5815f5f 100644 --- a/test/built-ins/Atomics/exchange/nonshared-int-views.js +++ b/test/built-ins/Atomics/exchange/nonshared-int-views.js @@ -13,9 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.exchange(new TA(buffer), 0, 0), - 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.exchange(new TA(buffer), 0, 0); + }, 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/exchange/shared-nonint-views.js b/test/built-ins/Atomics/exchange/shared-nonint-views.js index b5e2edb24c..c3e4ad4d0a 100644 --- a/test/built-ins/Atomics/exchange/shared-nonint-views.js +++ b/test/built-ins/Atomics/exchange/shared-nonint-views.js @@ -12,9 +12,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws( - TypeError, - () => Atomics.exchange(new TA(buffer), 0, 0), - 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError' - ); + assert.throws(TypeError, function() { + Atomics.exchange(new TA(buffer), 0, 0); + }, 'Atomics.exchange(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/load/bad-range.js b/test/built-ins/Atomics/load/bad-range.js index 32373693fa..5f6a901f0f 100644 --- a/test/built-ins/Atomics/load/bad-range.js +++ b/test/built-ins/Atomics/load/bad-range.js @@ -15,6 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.load(view, IdxGen(view))); + assert.throws(RangeError, function() { + Atomics.load(view, IdxGen(view)); + }, 'Atomics.load(view, IdxGen(view)) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/load/bigint/bad-range.js b/test/built-ins/Atomics/load/bigint/bad-range.js index b69a416042..6ec13f2a5b 100644 --- a/test/built-ins/Atomics/load/bigint/bad-range.js +++ b/test/built-ins/Atomics/load/bigint/bad-range.js @@ -14,6 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.load(view, IdxGen(view))); + assert.throws(RangeError, function() { + Atomics.load(view, IdxGen(view)); + }, 'Atomics.load(view, IdxGen(view)) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/load/bigint/nonshared-int-views.js b/test/built-ins/Atomics/load/bigint/nonshared-int-views.js index ae9c5f27ce..8dc6195901 100644 --- a/test/built-ins/Atomics/load/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/load/bigint/nonshared-int-views.js @@ -15,5 +15,7 @@ var ab = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { var view = new TA(ab); - assert.throws(TypeError, (() => Atomics.load(view, 0))); + assert.throws(TypeError, function() { + Atomics.load(view, 0); + }, 'Atomics.load(view, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/load/non-views.js b/test/built-ins/Atomics/load/non-views.js index 11187136fe..2dab45f5da 100644 --- a/test/built-ins/Atomics/load/non-views.js +++ b/test/built-ins/Atomics/load/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.load(view, 0))); + assert.throws(TypeError, function() { + Atomics.load(view, 0); + }, 'Atomics.load(view, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/load/nonshared-int-views.js b/test/built-ins/Atomics/load/nonshared-int-views.js index 54519f2101..6c33c02091 100644 --- a/test/built-ins/Atomics/load/nonshared-int-views.js +++ b/test/built-ins/Atomics/load/nonshared-int-views.js @@ -16,5 +16,7 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { var view = new TA(ab); - assert.throws(TypeError, (() => Atomics.load(view, 0))); + assert.throws(TypeError, function() { + Atomics.load(view, 0); + }, 'Atomics.load(view, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/load/shared-nonint-views.js b/test/built-ins/Atomics/load/shared-nonint-views.js index f50b274642..3e1f875a9d 100644 --- a/test/built-ins/Atomics/load/shared-nonint-views.js +++ b/test/built-ins/Atomics/load/shared-nonint-views.js @@ -11,5 +11,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.load(new TA(buffer), 0))); + assert.throws(TypeError, function() { + Atomics.load(new TA(buffer), 0); + }, 'Atomics.load(new TA(buffer), 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/or/bad-range.js b/test/built-ins/Atomics/or/bad-range.js index e1b9f68b3c..f9e5c3b872 100644 --- a/test/built-ins/Atomics/or/bad-range.js +++ b/test/built-ins/Atomics/or/bad-range.js @@ -15,6 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.or(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.or(view, IdxGen(view), 10); + }, 'Atomics.or(view, IdxGen(view), 10) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/or/bigint/bad-range.js b/test/built-ins/Atomics/or/bigint/bad-range.js index 2642445846..9c5693233d 100644 --- a/test/built-ins/Atomics/or/bigint/bad-range.js +++ b/test/built-ins/Atomics/or/bigint/bad-range.js @@ -14,6 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.or(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.or(view, IdxGen(view), 10); + }, 'Atomics.or(view, IdxGen(view), 10) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/or/bigint/nonshared-int-views.js b/test/built-ins/Atomics/or/bigint/nonshared-int-views.js index 9fbb6fce61..ae8b56117f 100644 --- a/test/built-ins/Atomics/or/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/or/bigint/nonshared-int-views.js @@ -12,5 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.or(new TA(buffer), 0, 0); + }, 'Atomics.or(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/or/non-views.js b/test/built-ins/Atomics/or/non-views.js index feb25c906e..04f82bacfc 100644 --- a/test/built-ins/Atomics/or/non-views.js +++ b/test/built-ins/Atomics/or/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.or(view, 0, 0))); + assert.throws(TypeError, function() { + Atomics.or(view, 0, 0); + }, 'Atomics.or(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/or/nonshared-int-views.js b/test/built-ins/Atomics/or/nonshared-int-views.js index 09517d4c84..5c92bd5665 100644 --- a/test/built-ins/Atomics/or/nonshared-int-views.js +++ b/test/built-ins/Atomics/or/nonshared-int-views.js @@ -13,5 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.or(new TA(buffer), 0, 0); + }, 'Atomics.or(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/or/shared-nonint-views.js b/test/built-ins/Atomics/or/shared-nonint-views.js index 5217318e8d..2dd48cbc3c 100644 --- a/test/built-ins/Atomics/or/shared-nonint-views.js +++ b/test/built-ins/Atomics/or/shared-nonint-views.js @@ -12,7 +12,9 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.or(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.or(new TA(buffer), 0, 0); + }, 'Atomics.or(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/store/bad-range.js b/test/built-ins/Atomics/store/bad-range.js index d5c31508f0..7511001408 100644 --- a/test/built-ins/Atomics/store/bad-range.js +++ b/test/built-ins/Atomics/store/bad-range.js @@ -15,6 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.store(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.store(view, IdxGen(view), 10); + }, 'Atomics.store(view, IdxGen(view), 10) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/store/bigint/bad-range.js b/test/built-ins/Atomics/store/bigint/bad-range.js index dfcb100ee1..7f7551ec50 100644 --- a/test/built-ins/Atomics/store/bigint/bad-range.js +++ b/test/built-ins/Atomics/store/bigint/bad-range.js @@ -14,6 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.store(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.store(view, IdxGen(view), 10); + }, 'Atomics.store(view, IdxGen(view), 10) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/store/bigint/nonshared-int-views.js b/test/built-ins/Atomics/store/bigint/nonshared-int-views.js index e9abab09ce..ab5942d81b 100644 --- a/test/built-ins/Atomics/store/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/store/bigint/nonshared-int-views.js @@ -12,5 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.store(new TA(buffer), 0, 0); + }, 'Atomics.store(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/store/non-views.js b/test/built-ins/Atomics/store/non-views.js index e34616f993..bc256a3a27 100644 --- a/test/built-ins/Atomics/store/non-views.js +++ b/test/built-ins/Atomics/store/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.store(view, 0, 0))); + assert.throws(TypeError, function() { + Atomics.store(view, 0, 0); + }, 'Atomics.store(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/store/nonshared-int-views.js b/test/built-ins/Atomics/store/nonshared-int-views.js index b6aec38496..90591d4489 100644 --- a/test/built-ins/Atomics/store/nonshared-int-views.js +++ b/test/built-ins/Atomics/store/nonshared-int-views.js @@ -13,5 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.store(new TA(buffer), 0, 0); + }, 'Atomics.store(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/store/shared-nonint-views.js b/test/built-ins/Atomics/store/shared-nonint-views.js index 4e363d409a..fd3d159e89 100644 --- a/test/built-ins/Atomics/store/shared-nonint-views.js +++ b/test/built-ins/Atomics/store/shared-nonint-views.js @@ -12,7 +12,9 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.store(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.store(new TA(buffer), 0, 0); + }, 'Atomics.store(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/sub/bad-range.js b/test/built-ins/Atomics/sub/bad-range.js index 35e152e681..dfbcb672d7 100644 --- a/test/built-ins/Atomics/sub/bad-range.js +++ b/test/built-ins/Atomics/sub/bad-range.js @@ -15,6 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.sub(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.sub(view, IdxGen(view), 10); + }, 'Atomics.sub(view, IdxGen(view), 10) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/sub/bigint/bad-range.js b/test/built-ins/Atomics/sub/bigint/bad-range.js index 4454cefeb1..040f4f4e73 100644 --- a/test/built-ins/Atomics/sub/bigint/bad-range.js +++ b/test/built-ins/Atomics/sub/bigint/bad-range.js @@ -14,6 +14,8 @@ var buffer = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(buffer); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.sub(view, IdxGen(view), 10)); + assert.throws(RangeError, function() { + Atomics.sub(view, IdxGen(view), 10); + }, 'Atomics.sub(view, IdxGen(view), 10) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/sub/bigint/nonshared-int-views.js b/test/built-ins/Atomics/sub/bigint/nonshared-int-views.js index c570a47902..de1455b301 100644 --- a/test/built-ins/Atomics/sub/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/sub/bigint/nonshared-int-views.js @@ -12,5 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.sub(new TA(buffer), 0, 0); + }, 'Atomics.sub(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/sub/non-views.js b/test/built-ins/Atomics/sub/non-views.js index d4b12d5b2d..46233994e6 100644 --- a/test/built-ins/Atomics/sub/non-views.js +++ b/test/built-ins/Atomics/sub/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.sub(view, 0, 0))); + assert.throws(TypeError, function() { + Atomics.sub(view, 0, 0); + }, 'Atomics.sub(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/sub/nonshared-int-views.js b/test/built-ins/Atomics/sub/nonshared-int-views.js index a254a20489..ff7bbf0925 100644 --- a/test/built-ins/Atomics/sub/nonshared-int-views.js +++ b/test/built-ins/Atomics/sub/nonshared-int-views.js @@ -13,5 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.sub(new TA(buffer), 0, 0); + }, 'Atomics.sub(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/sub/shared-nonint-views.js b/test/built-ins/Atomics/sub/shared-nonint-views.js index 89159d5879..9c373891cf 100644 --- a/test/built-ins/Atomics/sub/shared-nonint-views.js +++ b/test/built-ins/Atomics/sub/shared-nonint-views.js @@ -12,7 +12,9 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.sub(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.sub(new TA(buffer), 0, 0); + }, 'Atomics.sub(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/wait/bad-range.js b/test/built-ins/Atomics/wait/bad-range.js index eb051f381b..b435060181 100644 --- a/test/built-ins/Atomics/wait/bad-range.js +++ b/test/built-ins/Atomics/wait/bad-range.js @@ -19,5 +19,7 @@ var sab = new SharedArrayBuffer(8); let i32a = new Int32Array(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.wait(i32a, IdxGen(i32a), 0, 0)); + assert.throws(RangeError, function() { + Atomics.wait(i32a, IdxGen(i32a), 0, 0); + }, 'Atomics.wait(i32a, IdxGen(i32a), 0, 0) throws RangeError'); }); diff --git a/test/built-ins/Atomics/wait/bigint/bad-range.js b/test/built-ins/Atomics/wait/bigint/bad-range.js index eda06ac002..f40d76f01a 100644 --- a/test/built-ins/Atomics/wait/bigint/bad-range.js +++ b/test/built-ins/Atomics/wait/bigint/bad-range.js @@ -19,5 +19,7 @@ var sab = new SharedArrayBuffer(8); let i64a = new BigInt64Array(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.wait(i64a, IdxGen(i64a), 0, 0)); + assert.throws(RangeError, function() { + Atomics.wait(i64a, IdxGen(i64a), 0, 0); + }, 'Atomics.wait(i64a, IdxGen(i64a), 0, 0) throws RangeError'); }); diff --git a/test/built-ins/Atomics/wake/bad-range.js b/test/built-ins/Atomics/wake/bad-range.js index 0c4824d5bf..ab3ab03bb3 100644 --- a/test/built-ins/Atomics/wake/bad-range.js +++ b/test/built-ins/Atomics/wake/bad-range.js @@ -21,6 +21,8 @@ var views = [Int32Array]; testWithTypedArrayConstructors(function(TA) { let view = new TA(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.wake(view, IdxGen(view), 0)); // Even with waking zero + assert.throws(RangeError, function() { + Atomics.wake(view, IdxGen(view), 0); + }, 'Atomics.wake(view, IdxGen(view), 0) throws RangeError'); // Even with waking zero }); }, views); diff --git a/test/built-ins/Atomics/wake/bigint/bad-range.js b/test/built-ins/Atomics/wake/bigint/bad-range.js index 70d35c17a3..78a3786680 100644 --- a/test/built-ins/Atomics/wake/bigint/bad-range.js +++ b/test/built-ins/Atomics/wake/bigint/bad-range.js @@ -19,5 +19,7 @@ var sab = new SharedArrayBuffer(8); let i64a = new BigInt64Array(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.wake(view, IdxGen(i64a), 0)); + assert.throws(RangeError, function() { + Atomics.wake(view, IdxGen(i64a), 0); + }, 'Atomics.wake(view, IdxGen(i64a), 0) throws RangeError'); }); diff --git a/test/built-ins/Atomics/wake/negative-index-throws.js b/test/built-ins/Atomics/wake/negative-index-throws.js index 442fd4820a..c092f22074 100644 --- a/test/built-ins/Atomics/wake/negative-index-throws.js +++ b/test/built-ins/Atomics/wake/negative-index-throws.js @@ -24,7 +24,15 @@ var poisoned = { } }; -assert.throws(RangeError, () => Atomics.wake(i32a, -Infinity, poisoned)); -assert.throws(RangeError, () => Atomics.wake(i32a, -7.999, poisoned)); -assert.throws(RangeError, () => Atomics.wake(i32a, -1, poisoned)); -assert.throws(RangeError, () => Atomics.wake(i32a, -300, poisoned)); +assert.throws(RangeError, function() { + Atomics.wake(i32a, -Infinity, poisoned); +}, 'Atomics.wake(i32a, -Infinity, poisoned) throws RangeError'); +assert.throws(RangeError, function() { + Atomics.wake(i32a, -7.999, poisoned); +}, 'Atomics.wake(i32a, -7.999, poisoned) throws RangeError'); +assert.throws(RangeError, function() { + Atomics.wake(i32a, -1, poisoned); +}, 'Atomics.wake(i32a, -1, poisoned) throws RangeError'); +assert.throws(RangeError, function() { + Atomics.wake(i32a, -300, poisoned); +}, 'Atomics.wake(i32a, -300, poisoned) throws RangeError'); diff --git a/test/built-ins/Atomics/wake/non-views.js b/test/built-ins/Atomics/wake/non-views.js index aaffd00309..711d690392 100644 --- a/test/built-ins/Atomics/wake/non-views.js +++ b/test/built-ins/Atomics/wake/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.wake(view, 0, 0))); // Even with count == 0 + assert.throws(TypeError, function() { + Atomics.wake(view, 0, 0); + }, 'Atomics.wake(view, 0, 0) throws TypeError'); // Even with count == 0 }); diff --git a/test/built-ins/Atomics/wake/nonshared-int-views.js b/test/built-ins/Atomics/wake/nonshared-int-views.js index 8659be3581..e8cfc62481 100644 --- a/test/built-ins/Atomics/wake/nonshared-int-views.js +++ b/test/built-ins/Atomics/wake/nonshared-int-views.js @@ -14,5 +14,7 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { // Should fail even if waking zero waiters - assert.throws(TypeError, (() => Atomics.wake(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.wake(new TA(buffer), 0, 0); + }, 'Atomics.wake(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/wake/shared-nonint-views.js b/test/built-ins/Atomics/wake/shared-nonint-views.js index 727e2e5eaa..4259c3a7a1 100644 --- a/test/built-ins/Atomics/wake/shared-nonint-views.js +++ b/test/built-ins/Atomics/wake/shared-nonint-views.js @@ -12,7 +12,9 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.wake(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.wake(new TA(buffer), 0, 0); + }, 'Atomics.wake(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors); diff --git a/test/built-ins/Atomics/xor/bad-range.js b/test/built-ins/Atomics/xor/bad-range.js index 2dc1c48ee4..6679bdbda3 100644 --- a/test/built-ins/Atomics/xor/bad-range.js +++ b/test/built-ins/Atomics/xor/bad-range.js @@ -15,6 +15,8 @@ var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { let view = new TA(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.xor(view, IdxGen(view), 0)); + assert.throws(RangeError, function() { + Atomics.xor(view, IdxGen(view), 0); + }, 'Atomics.xor(view, IdxGen(view), 0) throws RangeError'); }); }, views); diff --git a/test/built-ins/Atomics/xor/bigint/bad-range.js b/test/built-ins/Atomics/xor/bigint/bad-range.js index 3837ea022f..faff7b0bb6 100644 --- a/test/built-ins/Atomics/xor/bigint/bad-range.js +++ b/test/built-ins/Atomics/xor/bigint/bad-range.js @@ -14,6 +14,8 @@ var sab = new SharedArrayBuffer(8); testWithBigIntTypedArrayConstructors(function(TA) { let view = new TA(sab); testWithAtomicsOutOfBoundsIndices(function(IdxGen) { - assert.throws(RangeError, () => Atomics.xor(view, IdxGen(view), 0)); + assert.throws(RangeError, function() { + Atomics.xor(view, IdxGen(view), 0); + }, 'Atomics.xor(view, IdxGen(view), 0) throws RangeError'); }); }); diff --git a/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js b/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js index 4bba3226fa..e90630be34 100644 --- a/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js +++ b/test/built-ins/Atomics/xor/bigint/nonshared-int-views.js @@ -12,5 +12,7 @@ features: [ArrayBuffer, arrow-function, Atomics, BigInt, TypedArray] var buffer = new ArrayBuffer(16); testWithBigIntTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.xor(new TA(buffer), 0, 0); + }, 'Atomics.xor(new TA(buffer), 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/xor/non-views.js b/test/built-ins/Atomics/xor/non-views.js index 1ff989839f..b328f70001 100644 --- a/test/built-ins/Atomics/xor/non-views.js +++ b/test/built-ins/Atomics/xor/non-views.js @@ -10,5 +10,7 @@ features: [ArrayBuffer, arrow-function, Atomics, DataView, for-of, let, SharedAr ---*/ testWithAtomicsNonViewValues(function(view) { - assert.throws(TypeError, (() => Atomics.xor(view, 0, 0))); + assert.throws(TypeError, function() { + Atomics.xor(view, 0, 0); + }, 'Atomics.xor(view, 0, 0) throws TypeError'); }); diff --git a/test/built-ins/Atomics/xor/nonshared-int-views.js b/test/built-ins/Atomics/xor/nonshared-int-views.js index 2ecdb02f5d..8be4b2d7bc 100644 --- a/test/built-ins/Atomics/xor/nonshared-int-views.js +++ b/test/built-ins/Atomics/xor/nonshared-int-views.js @@ -13,5 +13,7 @@ var buffer = new ArrayBuffer(16); var views = intArrayConstructors.slice(); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.xor(new TA(buffer), 0, 0); + }, 'Atomics.xor(new TA(buffer), 0, 0) throws TypeError'); }, views); diff --git a/test/built-ins/Atomics/xor/shared-nonint-views.js b/test/built-ins/Atomics/xor/shared-nonint-views.js index fca92c923a..845d459a94 100644 --- a/test/built-ins/Atomics/xor/shared-nonint-views.js +++ b/test/built-ins/Atomics/xor/shared-nonint-views.js @@ -12,5 +12,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1024); testWithTypedArrayConstructors(function(TA) { - assert.throws(TypeError, (() => Atomics.xor(new TA(buffer), 0, 0))); + assert.throws(TypeError, function() { + Atomics.xor(new TA(buffer), 0, 0); + }, 'Atomics.xor(new TA(buffer), 0, 0) throws TypeError'); }, floatArrayConstructors);