Fix syntax typos + whitespace (#2466)

Ref #2444
This commit is contained in:
Leo Balter 2020-01-08 13:57:49 -05:00 committed by GitHub
parent 65afdfbff6
commit 6e4d442cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 13 deletions

View File

@ -22,7 +22,6 @@ features: [TypedArray]
---*/
testWithTypedArrayConstructors(function(TA) {
var ta;
var array = [];
@ -35,8 +34,7 @@ testWithTypedArrayConstructors(function(TA) {
array.length = 10000; // big arrays are more likely to cause a crash if they are accessed after they are freed
array.fill(7, 0);
ta = new TA(array);
assert.throws(TypeError, function(){
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex}); },
"should throw TypeError as array is detached");
assert.throws(TypeError, function(){
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex});
}, "should throw TypeError as array is detached");
});

View File

@ -22,7 +22,6 @@ features: [TypedArray]
---*/
testWithTypedArrayConstructors(function(TA) {
var ta;
function detachAndReturnIndex(){
$DETACHBUFFER(ta.buffer);
@ -33,7 +32,7 @@ testWithTypedArrayConstructors(function(TA) {
array.length = 10000; // big arrays are more likely to cause a crash if they are accessed after they are freed
array.fill(7, 0);
ta = new TA(array);
assert.throws(TypeError, function(){
assert.throws(TypeError, function(){
ta.copyWithin(0, 100, {valueOf : detachAndReturnIndex});
"should throw TypeError as array is detached");
}, "should throw TypeError as array is detached");
});

View File

@ -22,7 +22,6 @@ features: [TypedArray]
---*/
testWithTypedArrayConstructors(function(TA) {
var ta;
function detachAndReturnIndex(){
$DETACHBUFFER(ta.buffer);
@ -33,9 +32,7 @@ testWithTypedArrayConstructors(function(TA) {
array.length = 10000; // big arrays are more likely to cause a crash if they are accessed after they are freed
array.fill(7, 0);
ta = new TA(array);
assert.throws(TypeError, function(){
assert.throws(TypeError, function(){
ta.copyWithin(0, {valueOf : detachAndReturnIndex}, 1000);
"should throw TypeError as array is detached");
});
}, "should throw TypeError as array is detached");
});