diff options
Diffstat (limited to 'test/built-ins/TypedArray/prototype/map')
11 files changed, 53 insertions, 53 deletions
diff --git a/test/built-ins/TypedArray/prototype/map/arraylength-internal.js b/test/built-ins/TypedArray/prototype/map/arraylength-internal.js index 39b34ae8a..bb7186fc8 100644 --- a/test/built-ins/TypedArray/prototype/map/arraylength-internal.js +++ b/test/built-ins/TypedArray/prototype/map/arraylength-internal.js @@ -14,7 +14,7 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample1 = new TA(42); var loop = 0; @@ -22,7 +22,7 @@ testWithTypedArrayConstructors(function(TA, N) { sample1.map(function() { loop++; - return N(0); + return 0; }); assert.sameValue(loop, 42, "data descriptor"); @@ -38,7 +38,7 @@ testWithTypedArrayConstructors(function(TA, N) { sample2.map(function() { loop++; - return N(0); + return 0; }); assert.sameValue(loop, 4, "accessor descriptor"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js index b0442e5e2..7b0fcfcf2 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-with-thisarg.js @@ -17,32 +17,32 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([42, 43, 44])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([42, 43, 44]); var results = []; var thisArg = ["test262", 0, "ecma262", 0]; sample.map(function() { results.push(arguments); - return N(0); + return 0; }, thisArg); assert.sameValue(results.length, 3, "results.length"); assert.sameValue(thisArg.length, 4, "thisArg.length"); assert.sameValue(results[0].length, 3, "results[0].length"); - assert.sameValue(results[0][0], N(42), "results[0][0] - kValue"); + assert.sameValue(results[0][0], 42, "results[0][0] - kValue"); assert.sameValue(results[0][1], 0, "results[0][1] - k"); assert.sameValue(results[0][2], sample, "results[0][2] - this"); assert.sameValue(results[1].length, 3, "results[1].length"); - assert.sameValue(results[1][0], N(43), "results[1][0] - kValue"); + assert.sameValue(results[1][0], 43, "results[1][0] - kValue"); assert.sameValue(results[1][1], 1, "results[1][1] - k"); assert.sameValue(results[1][2], sample, "results[1][2] - this"); assert.sameValue(results[2].length, 3, "results[2].length"); - assert.sameValue(results[2][0], N(44), "results[2][0] - kValue"); + assert.sameValue(results[2][0], 44, "results[2][0] - kValue"); assert.sameValue(results[2][1], 2, "results[2][1] - k"); assert.sameValue(results[2][2], sample, "results[2][2] - this"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js index 506f3e1ed..12ce6c784 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-arguments-without-thisarg.js @@ -17,30 +17,30 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([42, 43, 44])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([42, 43, 44]); var results = []; sample.map(function() { results.push(arguments); - return N(0); + return 0; }); assert.sameValue(results.length, 3, "results.length"); assert.sameValue(results[0].length, 3, "results[0].length"); - assert.sameValue(results[0][0], N(42), "results[0][0] - kValue"); + assert.sameValue(results[0][0], 42, "results[0][0] - kValue"); assert.sameValue(results[0][1], 0, "results[0][1] - k"); assert.sameValue(results[0][2], sample, "results[0][2] - this"); assert.sameValue(results[1].length, 3, "results[1].length"); - assert.sameValue(results[1][0], N(43), "results[1][0] - kValue"); + assert.sameValue(results[1][0], 43, "results[1][0] - kValue"); assert.sameValue(results[1][1], 1, "results[1][1] - k"); assert.sameValue(results[1][2], sample, "results[1][2] - this"); assert.sameValue(results[2].length, 3, "results[2].length"); - assert.sameValue(results[2][0], N(44), "results[2][0] - kValue"); + assert.sameValue(results[2][0], 44, "results[2][0] - kValue"); assert.sameValue(results[2][1], 2, "results[2][1] - k"); assert.sameValue(results[2][2], sample, "results[2][2] - this"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js b/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js index 72d775dfe..a183289a0 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-detachbuffer.js @@ -28,7 +28,7 @@ testWithTypedArrayConstructors(function(TA) { } $DETACHBUFFER(sample.buffer); loops++; - return N(0); + return 0; }); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js b/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js index eff8277d6..e097d50ce 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-no-interaction-over-non-integer-properties.js @@ -18,8 +18,8 @@ includes: [testTypedArray.js, compareArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([7, 8])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([7, 8]); var results = []; @@ -28,7 +28,7 @@ testWithTypedArrayConstructors(function(TA, N) { sample.map(function() { results.push(arguments); - return N(0); + return 0; }); assert.sameValue(results.length, 2, "results.length"); @@ -36,6 +36,6 @@ testWithTypedArrayConstructors(function(TA, N) { assert.sameValue(results[0][1], 0, "results[0][1] - k"); assert.sameValue(results[1][1], 1, "results[1][1] - k"); - assert.sameValue(results[0][0], N(7), "results[0][0] - kValue"); - assert.sameValue(results[1][0], N(8), "results[1][0] - kValue"); + assert.sameValue(results[0][0], 7, "results[0][0] - kValue"); + assert.sameValue(results[1][0], 8, "results[1][0] - kValue"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js index b05d96894..6f19e2277 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-affects-returned-object.js @@ -19,13 +19,13 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([1, 2, 4])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([1, 2, 4]); var result = sample.map(function(v) { - return v * N(3); + return v * 3; }); - assert.sameValue(result[0], N(3), "result[0] == 3"); - assert.sameValue(result[1], N(6), "result[1] == 6"); - assert.sameValue(result[2], N(12), "result[2] == 12"); + assert.sameValue(result[0], 3, "result[0] == 3"); + assert.sameValue(result[1], 6, "result[1] == 6"); + assert.sameValue(result[2], 12, "result[2] == 12"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js index 311fbde66..fe298618b 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-return-does-not-change-instance.js @@ -10,16 +10,16 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample1 = new TA(3); - sample1[1] = N(1); + sample1[1] = 1; sample1.map(function() { - return N(42); + return 42; }); - assert.sameValue(sample1[0], N(0), "[0] == 0"); - assert.sameValue(sample1[1], N(1), "[1] == 1"); - assert.sameValue(sample1[2], N(0), "[2] == 0"); + assert.sameValue(sample1[0], 0, "[0] == 0"); + assert.sameValue(sample1[1], 1, "[1] == 1"); + assert.sameValue(sample1[2], 0, "[2] == 0"); }); 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 d9fcda6ca..cbe3316cd 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 @@ -17,15 +17,15 @@ includes: [testTypedArray.js] features: [Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([7, 8])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([7, 8]); var bar = Symbol("1"); sample.foo = 42; sample[bar] = 1; var result = sample.map(function() { - return N(0); + return 0; }); assert.sameValue(result.length, 2, "result.length"); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js b/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js index b401826c6..ddc93200a 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-set-value-during-interaction.js @@ -11,33 +11,33 @@ includes: [testTypedArray.js] features: [Reflect.set, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([42, 43, 44])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([42, 43, 44]); var newVal = 0; sample.map(function(val, i) { if (i > 0) { assert.sameValue( - sample[i - 1], N(newVal - 1), + sample[i - 1], newVal - 1, "get the changed value during the loop" ); assert.sameValue( - Reflect.set(sample, 0, N(7)), + Reflect.set(sample, 0, 7), true, "re-set a value for sample[0]" ); } assert.sameValue( - Reflect.set(sample, i, N(newVal)), + Reflect.set(sample, i, newVal), true, "set value during iteration" ); newVal++; - return N(0); + return 0; }); - assert.sameValue(sample[0], N(7), "changed values after iteration [0] == 7"); - assert.sameValue(sample[1], N(1), "changed values after iteration [1] == 1"); - assert.sameValue(sample[2], N(2), "changed values after iteration [2] == 2"); + assert.sameValue(sample[0], 7, "changed values after iteration [0] == 7"); + assert.sameValue(sample[1], 1, "changed values after iteration [1] == 1"); + assert.sameValue(sample[2], 2, "changed values after iteration [2] == 2"); }); diff --git a/test/built-ins/TypedArray/prototype/map/callbackfn-this.js b/test/built-ins/TypedArray/prototype/map/callbackfn-this.js index 46d990972..43d3159bc 100644 --- a/test/built-ins/TypedArray/prototype/map/callbackfn-this.js +++ b/test/built-ins/TypedArray/prototype/map/callbackfn-this.js @@ -21,14 +21,14 @@ features: [TypedArray] var expected = (function() { return this; })(); var thisArg = {}; -testWithTypedArrayConstructors(function(TA, N) { +testWithTypedArrayConstructors(function(TA) { var sample = new TA(3); var results1 = []; sample.map(function() { results1.push(this); - return N(0); + return 0; }); assert.sameValue(results1.length, 3, "results1"); @@ -40,7 +40,7 @@ testWithTypedArrayConstructors(function(TA, N) { sample.map(function() { results2.push(this); - return N(0); + return 0; }, thisArg); assert.sameValue(results2.length, 3, "results2"); diff --git a/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js b/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js index e7d87ff1d..8900d596a 100644 --- a/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js +++ b/test/built-ins/TypedArray/prototype/map/values-are-not-cached.js @@ -11,18 +11,18 @@ includes: [testTypedArray.js] features: [TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA, N) { - var sample = new TA(N([42, 43, 44])); +testWithTypedArrayConstructors(function(TA) { + var sample = new TA([42, 43, 44]); sample.map(function(v, i) { if (i < sample.length - 1) { - sample[i+1] = N(42); + sample[i+1] = 42; } assert.sameValue( - v, N(42), "method does not cache values before callbackfn calls" + v, 42, "method does not cache values before callbackfn calls" ); - return N(0); + return 0; }); }); |