diff options
Diffstat (limited to 'test/built-ins/TypedArray/prototype')
16 files changed, 26 insertions, 30 deletions
diff --git a/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js b/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js index 51570aa23..b1897f10e 100644 --- a/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js +++ b/test/built-ins/TypedArray/prototype/byteOffset/return-byteoffset.js @@ -24,7 +24,7 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(ta2.byteOffset, offset, "TA(buffer, offset)"); var buffer2 = new ArrayBuffer(8 * TA.BYTES_PER_ELEMENT); - var sample = new TA(buffer2, offset) + var sample = new TA(buffer2, offset); var ta3 = new TA(sample); assert.sameValue(ta3.byteOffset, 0, "TA(typedArray)"); }); diff --git a/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js index b62d74e4c..0df67e610 100644 --- a/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/every/values-are-not-cached.js @@ -27,7 +27,6 @@ includes: [testTypedArray.js] testWithTypedArrayConstructors(function(TA) { var sample = new TA([42, 43, 44]); - var calls = 0; sample.every(function(v, i) { if (i < sample.length - 1) { diff --git a/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js b/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js index d39d6221b..545c7e181 100644 --- a/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js +++ b/test/built-ins/TypedArray/prototype/fill/fill-values-symbol-throws.js @@ -44,5 +44,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.fill(s); - }) + }); }); diff --git a/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js index a9bc612c0..9b0492602 100644 --- a/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/find/return-undefined-if-predicate-returns-false-value.js @@ -33,7 +33,7 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA(3); var called = 0; - var result = sample.find(function(val) { + var result = sample.find(function() { called++; return false; }); @@ -41,21 +41,21 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(called, 3, "predicate was called three times"); assert.sameValue(result, undefined); - result = sample.find(function(val) { return ""; }); + result = sample.find(function() { return ""; }); assert.sameValue(result, undefined, "ToBoolean(empty string)"); - result = sample.find(function(val) { return undefined; }); + result = sample.find(function() { return undefined; }); assert.sameValue(result, undefined, "ToBoolean(undefined)"); - result = sample.find(function(val) { return null; }); + result = sample.find(function() { return null; }); assert.sameValue(result, undefined, "ToBoolean(null)"); - result = sample.find(function(val) { return 0; }); + result = sample.find(function() { return 0; }); assert.sameValue(result, undefined, "ToBoolean(0)"); - result = sample.find(function(val) { return -0; }); + result = sample.find(function() { return -0; }); assert.sameValue(result, undefined, "ToBoolean(-0)"); - result = sample.find(function(val) { return NaN; }); + result = sample.find(function() { return NaN; }); assert.sameValue(result, undefined, "ToBoolean(NaN)"); }); diff --git a/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js b/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js index 400d05721..09729e234 100644 --- a/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js +++ b/test/built-ins/TypedArray/prototype/findIndex/return-negative-one-if-predicate-returns-false-value.js @@ -30,7 +30,7 @@ testWithTypedArrayConstructors(function(TA) { var sample = new TA([1, 2, 3]); var called = 0; - var result = sample.findIndex(function(val) { + var result = sample.findIndex(function() { called++; return false; }); @@ -38,21 +38,21 @@ testWithTypedArrayConstructors(function(TA) { assert.sameValue(called, 3, "predicate was called three times"); assert.sameValue(result, -1, "result is -1 when predicate returns are false"); - result = sample.findIndex(function(val) { return ""; }); + result = sample.findIndex(function() { return ""; }); assert.sameValue(result, -1, "ToBoolean(string)"); - result = sample.findIndex(function(val) { return undefined; }); + result = sample.findIndex(function() { return undefined; }); assert.sameValue(result, -1, "ToBoolean(undefined)"); - result = sample.findIndex(function(val) { return null; }); + result = sample.findIndex(function() { return null; }); assert.sameValue(result, -1, "ToBoolean(null)"); - result = sample.findIndex(function(val) { return 0; }); + result = sample.findIndex(function() { return 0; }); assert.sameValue(result, -1, "ToBoolean(0)"); - result = sample.findIndex(function(val) { return -0; }); + result = sample.findIndex(function() { return -0; }); assert.sameValue(result, -1, "ToBoolean(-0)"); - result = sample.findIndex(function(val) { return NaN; }); + result = sample.findIndex(function() { return NaN; }); assert.sameValue(result, -1, "ToBoolean(NaN)"); }); diff --git a/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js b/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js index 2b07c8c7a..69a11334a 100644 --- a/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js +++ b/test/built-ins/TypedArray/prototype/forEach/callbackfn-not-called-on-empty.js @@ -27,7 +27,7 @@ includes: [testTypedArray.js] testWithTypedArrayConstructors(function(TA) { var called = 0; - var result1 = new TA().forEach(function() { + new TA().forEach(function() { called++; }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js index a12260b21..491bacb72 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex-symbol.js @@ -28,5 +28,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.indexOf(7, fromIndex); - }) + }); }); diff --git a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js index d26490153..48b6f4711 100644 --- a/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/indexOf/return-abrupt-tointeger-fromindex.js @@ -31,5 +31,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.indexOf(7, fromIndex); - }) + }); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js index 96c5979d2..e3816c0bd 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex-symbol.js @@ -28,5 +28,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { sample.lastIndexOf(7, fromIndex); - }) + }); }); diff --git a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js index 85ebef5d7..8b29ac971 100644 --- a/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js +++ b/test/built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-tointeger-fromindex.js @@ -31,5 +31,5 @@ testWithTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { sample.lastIndexOf(7, fromIndex); - }) + }); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js index 4a60410b0..4b4897654 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-copy-non-integer-properties.js @@ -22,7 +22,7 @@ testWithTypedArrayConstructors(function(TA) { var bar = Symbol("1"); sample.foo = 42; - sample[bar] + sample[bar] = 1; var result = sample.map(function() { return 0; diff --git a/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js b/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js index 1aacdb1bd..4dd75f711 100644 --- a/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js +++ b/test/built-ins/TypedArray/prototype/some/returns-true-if-any-cb-returns-true.js @@ -29,9 +29,8 @@ features: [Symbol] var s = Symbol("1"); testWithTypedArrayConstructors(function(TA) { - var called = 0; var sample = new TA(42); - var values = [ + [ true, 1, "test262", diff --git a/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js index 7f775b549..3cc2a2252 100644 --- a/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/some/values-are-not-cached.js @@ -26,7 +26,6 @@ includes: [testTypedArray.js] testWithTypedArrayConstructors(function(TA) { var sample = new TA([42, 43, 44]); - var calls = 0; sample.some(function(v, i) { if (i < sample.length - 1) { diff --git a/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js b/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js index 368ffa2c3..97a52fc8b 100644 --- a/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js +++ b/test/built-ins/TypedArray/prototype/subarray/detached-buffer.js @@ -47,7 +47,7 @@ var o2 = { end = true; return 2; } -} +}; testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js index 7613f806f..278ca60b4 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation.js @@ -37,7 +37,6 @@ features: [Symbol.species] testWithTypedArrayConstructors(function(TA) { var sample = new TA([40, 41, 42]); - var calls = 0; var expectedOffset = TA.BYTES_PER_ELEMENT; var result, ctorThis; @@ -46,7 +45,7 @@ testWithTypedArrayConstructors(function(TA) { result = arguments; ctorThis = this; return new TA(buffer, offset, length); - };; + }; sample.subarray(1); diff --git a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js index 604cd07c1..207991bf2 100644 --- a/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js +++ b/test/built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor.js @@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA) { sample.constructor[Symbol.species] = function(buffer, offset, length) { calls++; return new TA(buffer, offset, length); - };; + }; result = sample.subarray(1); |