diff options
Diffstat (limited to 'test/built-ins/TypedArray/prototype/set')
22 files changed, 193 insertions, 193 deletions
diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js index c0e88a13d..a5ab52773 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-offset-tointeger.js @@ -18,78 +18,78 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample; - sample = new TA(N([1, 2])); - sample.set([N(42)], ""); - assert(compareArray(sample, N([42, 2])), "the empty string"); + sample = new TA([1, 2]); + sample.set([42], ""); + assert(compareArray(sample, [42, 2]), "the empty string"); - sample = new TA(N([1, 2])); - sample.set([N(42)], "0"); - assert(compareArray(sample, N([42, 2])), "'0'"); + sample = new TA([1, 2]); + sample.set([42], "0"); + assert(compareArray(sample, [42, 2]), "'0'"); - sample = new TA(N([1, 2])); - sample.set([N(42)], false); - assert(compareArray(sample, N([42, 2])), "false"); + sample = new TA([1, 2]); + sample.set([42], false); + assert(compareArray(sample, [42, 2]), "false"); - sample = new TA(N([1, 2])); - sample.set([N(42)], 0.1); - assert(compareArray(sample, N([42, 2])), "0.1"); + sample = new TA([1, 2]); + sample.set([42], 0.1); + assert(compareArray(sample, [42, 2]), "0.1"); - sample = new TA(N([1, 2])); - sample.set([N(42)], 0.9); - assert(compareArray(sample, N([42, 2])), "0.9"); + sample = new TA([1, 2]); + sample.set([42], 0.9); + assert(compareArray(sample, [42, 2]), "0.9"); - sample = new TA(N([1, 2])); - sample.set([N(42)], -0.5); - assert(compareArray(sample, N([42, 2])), "-0.5"); + sample = new TA([1, 2]); + sample.set([42], -0.5); + assert(compareArray(sample, [42, 2]), "-0.5"); - sample = new TA(N([1, 2])); - sample.set([N(42)], 1.1); - assert(compareArray(sample, N([1, 42])), "1.1"); + sample = new TA([1, 2]); + sample.set([42], 1.1); + assert(compareArray(sample, [1, 42]), "1.1"); - sample = new TA(N([1, 2])); - sample.set([N(42)], NaN); - assert(compareArray(sample, N([42, 2])), "NaN"); + sample = new TA([1, 2]); + sample.set([42], NaN); + assert(compareArray(sample, [42, 2]), "NaN"); - sample = new TA(N([1, 2])); - sample.set([N(42)], null); - assert(compareArray(sample, N([42, 2])), "null"); + sample = new TA([1, 2]); + sample.set([42], null); + assert(compareArray(sample, [42, 2]), "null"); - sample = new TA(N([1, 2])); - sample.set([N(42)], undefined); - assert(compareArray(sample, N([42, 2])), "undefined"); + sample = new TA([1, 2]); + sample.set([42], undefined); + assert(compareArray(sample, [42, 2]), "undefined"); - sample = new TA(N([1, 2])); - sample.set([N(42)], {}); - assert(compareArray(sample, N([42, 2])), "{}"); + sample = new TA([1, 2]); + sample.set([42], {}); + assert(compareArray(sample, [42, 2]), "{}"); - sample = new TA(N([1, 2])); - sample.set([N(42)], []); - assert(compareArray(sample, N([42, 2])), "[]"); + sample = new TA([1, 2]); + sample.set([42], []); + assert(compareArray(sample, [42, 2]), "[]"); - sample = new TA(N([1, 2])); - sample.set([N(42)], [0]); - assert(compareArray(sample, N([42, 2])), "[0]"); + sample = new TA([1, 2]); + sample.set([42], [0]); + assert(compareArray(sample, [42, 2]), "[0]"); - sample = new TA(N([1, 2])); - sample.set([N(42)], true); - assert(compareArray(sample, N([1, 42])), "true"); + sample = new TA([1, 2]); + sample.set([42], true); + assert(compareArray(sample, [1, 42]), "true"); - sample = new TA(N([1, 2])); - sample.set([N(42)], "1"); - assert(compareArray(sample, N([1, 42])), "'1'"); + sample = new TA([1, 2]); + sample.set([42], "1"); + assert(compareArray(sample, [1, 42]), "'1'"); - sample = new TA(N([1, 2])); - sample.set([N(42)], [1]); - assert(compareArray(sample, N([1, 42])), "[1]"); + sample = new TA([1, 2]); + sample.set([42], [1]); + assert(compareArray(sample, [1, 42]), "[1]"); - sample = new TA(N([1, 2])); - sample.set([N(42)], { valueOf: function() {return 1;} }); - assert(compareArray(sample, N([1, 42])), "valueOf"); + sample = new TA([1, 2]); + sample.set([42], { valueOf: function() {return 1;} }); + assert(compareArray(sample, [1, 42]), "valueOf"); - sample = new TA(N([1, 2])); - sample.set([N(42)], { toString: function() {return 1;} }); - assert(compareArray(sample, N([1, 42])), "toString"); + sample = new TA([1, 2]); + sample.set([42], { toString: function() {return 1;} }); + assert(compareArray(sample, [1, 42]), "toString"); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js index e4b1b7726..2c67c5cc4 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-length.js @@ -24,8 +24,8 @@ Object.defineProperty(obj, "length", { } }); -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 3])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 3]); assert.throws(Test262Error, function() { sample.set(obj); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js index c96f7bcb9..afe080030 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-get-value.js @@ -22,12 +22,12 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var obj = { length: 4, - "0": N(42), - "1": N(43), - "3": N(44) + "0": 42, + "1": 43, + "3": 44 }; Object.defineProperty(obj, "2", { get: function() { @@ -35,14 +35,14 @@ testWithTypedArrayConstructors(function(TA, N) { } }); - var sample = new TA(N([1, 2, 3, 4])); + var sample = new TA([1, 2, 3, 4]); assert.throws(Test262Error, function() { sample.set(obj); }); assert( - compareArray(sample, N([42, 43, 3, 4])), + compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js index a1c8bd795..f5b2289d8 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length-symbol.js @@ -21,8 +21,8 @@ var obj = { length: Symbol("1") }; -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 3])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 3]); assert.throws(TypeError, function() { sample.set(obj); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js index bac8f5b74..8252ebbef 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-length.js @@ -33,8 +33,8 @@ var obj2 = { } }; -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 3])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 3]); assert.throws(Test262Error, function() { sample.set(obj1); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js index db48b41d7..2afc27a6f 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value-symbol.js @@ -22,23 +22,23 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var obj = { length: 4, - "0": N(42), - "1": N(43), + "0": 42, + "1": 43, "2": Symbol("1"), - "3": N(44) + "3": 44 }; - var sample = new TA(N([1, 2, 3, 4])); + var sample = new TA([1, 2, 3, 4]); assert.throws(TypeError, function() { sample.set(obj); }); assert( - compareArray(sample, N([42, 43, 3, 4])), + compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js index 6348580e2..438001533 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-src-tonumber-value.js @@ -22,27 +22,27 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var obj = { length: 4, - "0": N(42), - "1": N(43), + "0": 42, + "1": 43, "2": { valueOf: function() { throw new Test262Error(); } }, - "3": N(44) + "3": 44 }; - var sample = new TA(N([1, 2, 3, 4])); + var sample = new TA([1, 2, 3, 4]); assert.throws(Test262Error, function() { sample.set(obj); }); assert( - compareArray(sample, N([42, 43, 3, 4])), + compareArray(sample, [42, 43, 3, 4]), "values are set until exception" ); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js index 78a3c00d0..d36712393 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-return-abrupt-from-toobject-offset.js @@ -17,8 +17,8 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 3])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 3]); assert.throws(TypeError, function() { sample.set(undefined); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js b/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js index 95ef44d9f..9c1603a30 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-set-values-in-order.js @@ -22,7 +22,7 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(5); var calls = []; var obj = { @@ -32,7 +32,7 @@ testWithTypedArrayConstructors(function(TA, N) { get: function() { calls.push(0); calls.push(sample.join()); - return N(42); + return 42; } }); @@ -40,7 +40,7 @@ testWithTypedArrayConstructors(function(TA, N) { get: function() { calls.push(1); calls.push(sample.join()); - return N(43); + return 43; } }); @@ -48,7 +48,7 @@ testWithTypedArrayConstructors(function(TA, N) { get: function() { calls.push(2); calls.push(sample.join()); - return N(44); + return 44; } }); @@ -61,7 +61,7 @@ testWithTypedArrayConstructors(function(TA, N) { sample.set(obj, 1); assert( - compareArray(sample, N([0, 42, 43, 44, 0])), + compareArray(sample, [0, 42, 43, 44, 0]), "values are set for src length" ); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js b/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js index 5490305d0..6e53dbc94 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-set-values.js @@ -22,42 +22,42 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var src = N([42, 43]); +testWithTypedArrayConstructors(function(TA) { + var src = [42, 43]; var srcObj = { length: 2, - '0': N(7), - '1': N(17) + '0': 7, + '1': 17 }; var sample, result; - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 0); - assert(compareArray(sample, N([42, 43, 3, 4])), "offset: 0, result: " + sample); + assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 1); - assert(compareArray(sample, N([1, 42, 43, 4])), "offset: 1, result: " + sample); + assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 2); - assert(compareArray(sample, N([1, 2, 42, 43])), "offset: 2, result: " + sample); + assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(srcObj, 0); - assert(compareArray(sample, N([7, 17, 3, 4])), "offset: 0, result: " + sample); + assert(compareArray(sample, [7, 17, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(srcObj, 1); - assert(compareArray(sample, N([1, 7, 17, 4])), "offset: 1, result: " + sample); + assert(compareArray(sample, [1, 7, 17, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(srcObj, 2); - assert(compareArray(sample, N([1, 2, 7, 17])), "offset: 2, result: " + sample); + assert(compareArray(sample, [1, 2, 7, 17]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js b/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js index 78ed1b455..e9dce1b65 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-src-tonumber-value-type-conversions.js @@ -22,10 +22,10 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var obj1 = { valueOf: function() { - return N(42); + return 42; } }; @@ -38,14 +38,14 @@ testWithTypedArrayConstructors(function(TA, N) { // undefined and NaN covered on typedArrayConversions var nullish; try { - nullish = N(null); + nullish = null; } catch (e) { nullish = 0n; } var arr = ["1", "", false, true, nullish, obj1, obj2, [], [1]]; var sample = new TA(arr.length); - var expected = new TA(N([1, 0, 0, 1, 0, 42, 42, 0, 1])); + var expected = new TA([1, 0, 0, 1, 0, 42, 42, 0, 1]); sample.set(arr); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js b/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js index 8931748ec..a3750490f 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-src-values-are-not-cached.js @@ -22,26 +22,26 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(5); var obj = { length: 5, - '1': N(7), - '2': N(7), - '3': N(7), - '4': N(7) + '1': 7, + '2': 7, + '3': 7, + '4': 7 }; Object.defineProperty(obj, 0, { get: function() { - obj[1] = N(43); - obj[2] = N(44); - obj[3] = N(45); - obj[4] = N(46); - return N(42); + obj[1] = 43; + obj[2] = 44; + obj[3] = 45; + obj[4] = 46; + return 42; } }); sample.set(obj); - assert(compareArray(sample, N([42, 43, 44, 45, 46]))); + assert(compareArray(sample, [42, 43, 44, 45, 46])); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js index 4a6e1ee39..97bead5c9 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-target-arraylength-internal.js @@ -29,13 +29,13 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); - sample.set(N([42, 43])); + sample.set([42, 43]); assert.sameValue(getCalls, 0, "ignores length properties"); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js index e77c0bdfd..eed7db083 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws.js @@ -22,11 +22,11 @@ includes: [testTypedArray.js, detachArrayBuffer.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 3])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 3]); var obj = { length: 3, - "0": N(42) + "0": 42 }; Object.defineProperty(obj, 1, { get: function() { diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js index 2bdb3ded3..7f63cb996 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-offset-tointeger.js @@ -15,79 +15,79 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample; - var src = new TA(N([42])); + var src = new TA([42]); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, ""); - assert(compareArray(sample, N([42, 2])), "the empty string"); + assert(compareArray(sample, [42, 2]), "the empty string"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, "0"); - assert(compareArray(sample, N([42, 2])), "'0'"); + assert(compareArray(sample, [42, 2]), "'0'"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, false); - assert(compareArray(sample, N([42, 2])), "false"); + assert(compareArray(sample, [42, 2]), "false"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, 0.1); - assert(compareArray(sample, N([42, 2])), "0.1"); + assert(compareArray(sample, [42, 2]), "0.1"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, 0.9); - assert(compareArray(sample, N([42, 2])), "0.9"); + assert(compareArray(sample, [42, 2]), "0.9"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, -0.5); - assert(compareArray(sample, N([42, 2])), "-0.5"); + assert(compareArray(sample, [42, 2]), "-0.5"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, 1.1); - assert(compareArray(sample, N([1, 42])), "1.1"); + assert(compareArray(sample, [1, 42]), "1.1"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, NaN); - assert(compareArray(sample, N([42, 2])), "NaN"); + assert(compareArray(sample, [42, 2]), "NaN"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, null); - assert(compareArray(sample, N([42, 2])), "null"); + assert(compareArray(sample, [42, 2]), "null"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, undefined); - assert(compareArray(sample, N([42, 2])), "undefined"); + assert(compareArray(sample, [42, 2]), "undefined"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, {}); - assert(compareArray(sample, N([42, 2])), "{}"); + assert(compareArray(sample, [42, 2]), "{}"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, []); - assert(compareArray(sample, N([42, 2])), "[]"); + assert(compareArray(sample, [42, 2]), "[]"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, [0]); - assert(compareArray(sample, N([42, 2])), "[0]"); + assert(compareArray(sample, [42, 2]), "[0]"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, true); - assert(compareArray(sample, N([1, 42])), "true"); + assert(compareArray(sample, [1, 42]), "true"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, "1"); - assert(compareArray(sample, N([1, 42])), "'1'"); + assert(compareArray(sample, [1, 42]), "'1'"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, [1]); - assert(compareArray(sample, N([1, 42])), "[1]"); + assert(compareArray(sample, [1, 42]), "[1]"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, { valueOf: function() {return 1;} }); - assert(compareArray(sample, N([1, 42])), "valueOf"); + assert(compareArray(sample, [1, 42]), "valueOf"); - sample = new TA(N([1, 2])); + sample = new TA([1, 2]); sample.set(src, { toString: function() {return 1;} }); - assert(compareArray(sample, N([1, 42])), "toString"); + assert(compareArray(sample, [1, 42]), "toString"); }); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js index 4f21a918d..4ba857e03 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type.js @@ -26,26 +26,26 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var other = TA === Float32Array ? Float64Array : Float32Array; if (typeof BigInt !== "undefined") other = TA === BigInt64Array ? BigUint64Array : TA === BigUint64Array ? BigInt64Array : other; - var src = new other(N([42, 43])); + var src = new other([42, 43]); var sample, result; - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 0); - assert(compareArray(sample, N([42, 43, 3, 4])), "offset: 0, result: " + sample); + assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 1); - assert(compareArray(sample, N([1, 42, 43, 4])), "offset: 1, result: " + sample); + assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 2); - assert(compareArray(sample, N([1, 2, 42, 43])), "offset: 2, result: " + sample); + assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); }); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js index 4dcde7c09..b91574785 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type.js @@ -29,22 +29,22 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample, result; - var src = new TA(N([42, 43])); + var src = new TA([42, 43]); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 1); - assert(compareArray(sample, N([1, 42, 43, 4])), "offset: 1, result: " + sample); + assert(compareArray(sample, [1, 42, 43, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 0); - assert(compareArray(sample, N([42, 43, 3, 4])), "offset: 0, result: " + sample); + assert(compareArray(sample, [42, 43, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); result = sample.set(src, 2); - assert(compareArray(sample, N([1, 2, 42, 43])), "offset: 2, result: " + sample); + assert(compareArray(sample, [1, 2, 42, 43]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); }); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js index bd3256da6..02d15ddee 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type.js @@ -30,24 +30,24 @@ includes: [testTypedArray.js, compareArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample, src, result; - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 0); - assert(compareArray(sample, N([1, 2, 3, 4])), "offset: 0, result: " + sample); + assert(compareArray(sample, [1, 2, 3, 4]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 1); - assert(compareArray(sample, N([1, 1, 2, 4])), "offset: 1, result: " + sample); + assert(compareArray(sample, [1, 1, 2, 4]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA(N([1, 2, 3, 4])); + sample = new TA([1, 2, 3, 4]); src = new TA(sample.buffer, 0, 2); result = sample.set(src, 2); - assert(compareArray(sample, N([1, 2, 1, 2])), "offset: 2, result: " + sample); + assert(compareArray(sample, [1, 2, 1, 2]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); }); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js index 0009dae86..864172b96 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-arraylength-internal.js @@ -28,9 +28,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); - var src = new TA(N([42, 43])); + var src = new TA([42, 43]); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(src, "length", desc); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js index 811c2c86a..498ac5fc8 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-src-byteoffset-internal.js @@ -25,14 +25,14 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); - var src = new TA(N([42, 43])); + var src = new TA([42, 43]); var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; if (typeof BigInt !== "undefined") differentTA = TA === BigInt64Array ? BigUint64Array : TA === BigUint64Array ? BigInt64Array : differentTA; - var src2 = new differentTA(N([42, 43])); + var src2 = new differentTA([42, 43]); var src3 = new differentTA(sample.buffer, 0, 2); Object.defineProperty(TA.prototype, "byteOffset", desc); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js index df8f06859..fe251f1f1 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-arraylength-internal.js @@ -29,9 +29,9 @@ var desc = { Object.defineProperty(TypedArray.prototype, "length", desc); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); - var src = new TA(N([42, 43])); + var src = new TA([42, 43]); Object.defineProperty(TA.prototype, "length", desc); Object.defineProperty(sample, "length", desc); diff --git a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js index 29dd574df..ac5b8f6cb 100644 --- a/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js +++ b/test/built-ins/TypedArray/prototype/set/typedarray-arg-target-byteoffset-internal.js @@ -26,14 +26,14 @@ var desc = { Object.defineProperty(TypedArray.prototype, "byteOffset", desc); -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(2); - var src = new TA(N([42, 43])); + var src = new TA([42, 43]); var differentTA = TA === Uint8Array ? Int8Array : Uint8Array; if (typeof BigInt !== "undefined") differentTA = TA === BigInt64Array ? BigUint64Array : TA === BigUint64Array ? BigInt64Array : differentTA; - var src2 = new differentTA(N([42, 43])); + var src2 = new differentTA([42, 43]); var src3 = new differentTA(sample.buffer, 0, 2); Object.defineProperty(TA.prototype, "byteOffset", desc); |