Atomics: fix assertion messages

This commit is contained in:
Rick Waldron 2020-05-13 16:40:38 -04:00
parent 1f977dc9fc
commit 2979e917a2
12 changed files with 12 additions and 12 deletions

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.add(view, 0, 1n); Atomics.add(view, 0, 1n);
}, `Atomics.add(new ${TA.name}(view), 0, 1n) throws TypeError`); }, `Atomics.add(new ${TA.name}(buffer), 0, 1n) throws TypeError`);
}); });

View File

@ -16,5 +16,5 @@ testWithNonSharableTypedArrayConstructors(function(TA) {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.add(view, 0, 1); Atomics.add(view, 0, 1);
}, `Atomics.add(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.add(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.and(view, 0, 1); Atomics.and(view, 0, 1);
}, `Atomics.and(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}); });

View File

@ -16,5 +16,5 @@ testWithNonSharableTypedArrayConstructors(function(TA) {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.and(view, 0, 1); Atomics.and(view, 0, 1);
}, `Atomics.and(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.and(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.compareExchange(view, 0, 0n, 0n); Atomics.compareExchange(view, 0, 0n, 0n);
}, `Atomics.compareExchange(new ${TA.name}(view), 0, 0n, 0n) throws TypeError`); }, `Atomics.compareExchange(new ${TA.name}(buffer), 0, 0n, 0n) throws TypeError`);
}); });

View File

@ -16,5 +16,5 @@ testWithNonSharableTypedArrayConstructors(function(TA) {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.compareExchange(view, 0, 0, 0); Atomics.compareExchange(view, 0, 0, 0);
}, `Atomics.compareExchange(new ${TA.name}(view), 0, 0, 0) throws TypeError`); }, `Atomics.compareExchange(new ${TA.name}(buffer), 0, 0, 0) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.exchange(view, 0, 0n); Atomics.exchange(view, 0, 0n);
}, `Atomics.exchange(new ${TA.name}(view), 0, 0n) throws TypeError`); }, `Atomics.exchange(new ${TA.name}(buffer), 0, 0n) throws TypeError`);
}); });

View File

@ -16,5 +16,5 @@ testWithNonSharableTypedArrayConstructors(function(TA) {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.add(view, 0, 1); Atomics.add(view, 0, 1);
}, `Atomics.add(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.add(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.load(view, 0); Atomics.load(view, 0);
}, `Atomics.load(new ${TA.name}(view), 0) throws TypeError`); }, `Atomics.load(new ${TA.name}(buffer), 0) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonSharableTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.load(view, 0); Atomics.load(view, 0);
}, `Atomics.load(new ${TA.name}(view), 0) throws TypeError`); }, `Atomics.load(new ${TA.name}(buffer), 0) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ testWithNonShareableBigIntTypedArrayConstructors(function(TA) {
const view = new TA(buffer); const view = new TA(buffer);
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.store(view, 0, 1); Atomics.store(view, 0, 1);
}, `Atomics.store(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.store(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}); });

View File

@ -15,5 +15,5 @@ const views = intArrayConstructors.slice();
testWithNonSharableTypedArrayConstructors(function(TA) { testWithNonSharableTypedArrayConstructors(function(TA) {
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
Atomics.store(new TA(buffer), 0, 0); Atomics.store(new TA(buffer), 0, 0);
}, `Atomics.store(new ${TA.name}(view), 0, 1) throws TypeError`); }, `Atomics.store(new ${TA.name}(buffer), 0, 1) throws TypeError`);
}, views); }, views);