summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArray/prototype/slice
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArray/prototype/slice')
-rw-r--r--test/built-ins/TypedArray/prototype/slice/arraylength-internal.js8
-rw-r--r--test/built-ins/TypedArray/prototype/slice/infinity.js8
-rw-r--r--test/built-ins/TypedArray/prototype/slice/minus-zero.js8
-rw-r--r--test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/results-with-different-length.js60
-rw-r--r--test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/results-with-same-length.js12
-rw-r--r--test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js6
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js4
-rw-r--r--test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js6
-rw-r--r--test/built-ins/TypedArray/prototype/slice/tointeger-end.js20
-rw-r--r--test/built-ins/TypedArray/prototype/slice/tointeger-start.js30
17 files changed, 95 insertions, 95 deletions
diff --git a/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js b/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js
index 8cf705583..2c9e7cba3 100644
--- a/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js
+++ b/test/built-ins/TypedArray/prototype/slice/arraylength-internal.js
@@ -23,8 +23,8 @@ var desc = {
Object.defineProperty(TypedArray.prototype, "length", desc);
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([42, 43]);
Object.defineProperty(TA.prototype, "length", desc);
Object.defineProperty(sample, "length", desc);
@@ -32,7 +32,7 @@ testWithTypedArrayConstructors(function(TA, N) {
var result = sample.slice();
assert.sameValue(getCalls, 0, "ignores length properties");
- assert.sameValue(result[0], N(42));
- assert.sameValue(result[1], N(43));
+ assert.sameValue(result[0], 42);
+ assert.sameValue(result[1], 43);
assert.sameValue(result.hasOwnProperty(2), false);
});
diff --git a/test/built-ins/TypedArray/prototype/slice/infinity.js b/test/built-ins/TypedArray/prototype/slice/infinity.js
index 7fda1ec89..a93cd713a 100644
--- a/test/built-ins/TypedArray/prototype/slice/infinity.js
+++ b/test/built-ins/TypedArray/prototype/slice/infinity.js
@@ -7,11 +7,11 @@ includes: [testTypedArray.js, compareArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
assert(
- compareArray(sample.slice(-Infinity), N([40, 41, 42, 43])),
+ compareArray(sample.slice(-Infinity), [40, 41, 42, 43]),
"start == -Infinity"
);
assert(
@@ -23,7 +23,7 @@ testWithTypedArrayConstructors(function(TA, N) {
"end == -Infinity"
);
assert(
- compareArray(sample.slice(0, Infinity), N([40, 41, 42, 43])),
+ compareArray(sample.slice(0, Infinity), [40, 41, 42, 43]),
"end == Infinity"
);
});
diff --git a/test/built-ins/TypedArray/prototype/slice/minus-zero.js b/test/built-ins/TypedArray/prototype/slice/minus-zero.js
index b4c000bc0..c597dadec 100644
--- a/test/built-ins/TypedArray/prototype/slice/minus-zero.js
+++ b/test/built-ins/TypedArray/prototype/slice/minus-zero.js
@@ -9,15 +9,15 @@ includes: [testTypedArray.js, compareArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
assert(
- compareArray(sample.slice(-0), N([40, 41, 42, 43])),
+ compareArray(sample.slice(-0), [40, 41, 42, 43]),
"start == -0"
);
assert(
- compareArray(sample.slice(-0, 4), N([40, 41, 42, 43])),
+ compareArray(sample.slice(-0, 4), [40, 41, 42, 43]),
"start == -0, end == length"
);
assert(
diff --git a/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js b/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js
index ca2b9d8e9..91df72a33 100644
--- a/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js
+++ b/test/built-ins/TypedArray/prototype/slice/result-does-not-copy-ordinary-properties.js
@@ -9,8 +9,8 @@ includes: [testTypedArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([41, 42, 43, 44]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([41, 42, 43, 44]);
sample.foo = 42;
var result = sample.slice();
diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js
index b6a62afb8..34a4ad11b 100644
--- a/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/results-with-different-length.js
@@ -7,47 +7,47 @@ includes: [testTypedArray.js, compareArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
function testRes(result, expected, msg) {
assert(compareArray(result, expected), msg + ", result: [" + result + "]");
}
- testRes(sample.slice(1), N([41, 42, 43]), "begin == 1");
- testRes(sample.slice(2), N([42, 43]), "begin == 2");
- testRes(sample.slice(3), N([43]), "begin == 3");
+ testRes(sample.slice(1), [41, 42, 43], "begin == 1");
+ testRes(sample.slice(2), [42, 43], "begin == 2");
+ testRes(sample.slice(3), [43], "begin == 3");
- testRes(sample.slice(1, 4), N([41, 42, 43]), "begin == 1, end == length");
- testRes(sample.slice(2, 4), N([42, 43]), "begin == 2, end == length");
- testRes(sample.slice(3, 4), N([43]), "begin == 3, end == length");
+ testRes(sample.slice(1, 4), [41, 42, 43], "begin == 1, end == length");
+ testRes(sample.slice(2, 4), [42, 43], "begin == 2, end == length");
+ testRes(sample.slice(3, 4), [43], "begin == 3, end == length");
- testRes(sample.slice(0, 1), N([40]), "begin == 0, end == 1");
- testRes(sample.slice(0, 2), N([40, 41]), "begin == 0, end == 2");
- testRes(sample.slice(0, 3), N([40, 41, 42]), "begin == 0, end == 3");
+ testRes(sample.slice(0, 1), [40], "begin == 0, end == 1");
+ testRes(sample.slice(0, 2), [40, 41], "begin == 0, end == 2");
+ testRes(sample.slice(0, 3), [40, 41, 42], "begin == 0, end == 3");
- testRes(sample.slice(-1), N([43]), "begin == -1");
- testRes(sample.slice(-2), N([42, 43]), "begin == -2");
- testRes(sample.slice(-3), N([41, 42, 43]), "begin == -3");
+ testRes(sample.slice(-1), [43], "begin == -1");
+ testRes(sample.slice(-2), [42, 43], "begin == -2");
+ testRes(sample.slice(-3), [41, 42, 43], "begin == -3");
- testRes(sample.slice(-1, 4), N([43]), "begin == -1, end == length");
- testRes(sample.slice(-2, 4), N([42, 43]), "begin == -2, end == length");
- testRes(sample.slice(-3, 4), N([41, 42, 43]), "begin == -3, end == length");
+ testRes(sample.slice(-1, 4), [43], "begin == -1, end == length");
+ testRes(sample.slice(-2, 4), [42, 43], "begin == -2, end == length");
+ testRes(sample.slice(-3, 4), [41, 42, 43], "begin == -3, end == length");
- testRes(sample.slice(0, -1), N([40, 41, 42]), "begin == 0, end == -1");
- testRes(sample.slice(0, -2), N([40, 41]), "begin == 0, end == -2");
- testRes(sample.slice(0, -3), N([40]), "begin == 0, end == -3");
+ testRes(sample.slice(0, -1), [40, 41, 42], "begin == 0, end == -1");
+ testRes(sample.slice(0, -2), [40, 41], "begin == 0, end == -2");
+ testRes(sample.slice(0, -3), [40], "begin == 0, end == -3");
- testRes(sample.slice(-0, -1), N([40, 41, 42]), "begin == -0, end == -1");
- testRes(sample.slice(-0, -2), N([40, 41]), "begin == -0, end == -2");
- testRes(sample.slice(-0, -3), N([40]), "begin == -0, end == -3");
+ testRes(sample.slice(-0, -1), [40, 41, 42], "begin == -0, end == -1");
+ testRes(sample.slice(-0, -2), [40, 41], "begin == -0, end == -2");
+ testRes(sample.slice(-0, -3), [40], "begin == -0, end == -3");
- testRes(sample.slice(-2, -1), N([42]), "length == 4, begin == -2, end == -1");
- testRes(sample.slice(1, -1), N([41, 42]), "length == 4, begin == 1, end == -1");
- testRes(sample.slice(1, -2), N([41]), "length == 4, begin == 1, end == -2");
- testRes(sample.slice(2, -1), N([42]), "length == 4, begin == 2, end == -1");
+ testRes(sample.slice(-2, -1), [42], "length == 4, begin == -2, end == -1");
+ testRes(sample.slice(1, -1), [41, 42], "length == 4, begin == 1, end == -1");
+ testRes(sample.slice(1, -2), [41], "length == 4, begin == 1, end == -2");
+ testRes(sample.slice(2, -1), [42], "length == 4, begin == 2, end == -1");
- testRes(sample.slice(-1, 5), N([43]), "begin == -1, end > length");
- testRes(sample.slice(-2, 4), N([42, 43]), "begin == -2, end > length");
- testRes(sample.slice(-3, 4), N([41, 42, 43]), "begin == -3, end > length");
+ testRes(sample.slice(-1, 5), [43], "begin == -1, end > length");
+ testRes(sample.slice(-2, 4), [42, 43], "begin == -2, end > length");
+ testRes(sample.slice(-3, 4), [41, 42, 43], "begin == -3, end > length");
});
diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js
index a3c749057..7cd44b9c6 100644
--- a/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/results-with-empty-length.js
@@ -7,8 +7,8 @@ includes: [testTypedArray.js, compareArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
function testRes(result, msg) {
assert.sameValue(result.length, 0, msg);
diff --git a/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js b/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js
index 904efd50b..d89cbbdf5 100644
--- a/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js
+++ b/test/built-ins/TypedArray/prototype/slice/results-with-same-length.js
@@ -7,15 +7,15 @@ includes: [testTypedArray.js, compareArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
function testRes(result, msg) {
assert.sameValue(result.length, 4, msg);
- assert.sameValue(result[0], N(40), msg + " & result[0] === 40");
- assert.sameValue(result[1], N(41), msg + " & result[1] === 41");
- assert.sameValue(result[2], N(42), msg + " & result[2] === 42");
- assert.sameValue(result[3], N(43), msg + " & result[3] === 43");
+ assert.sameValue(result[0], 40, msg + " & result[0] === 40");
+ assert.sameValue(result[1], 41, msg + " & result[1] === 41");
+ assert.sameValue(result[2], 42, msg + " & result[2] === 42");
+ assert.sameValue(result[3], 43, msg + " & result[3] === 43");
}
testRes(sample.slice(0), "begin == 0");
diff --git a/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js b/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js
index 89f322ce0..c0195b705 100644
--- a/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js
+++ b/test/built-ins/TypedArray/prototype/slice/set-values-from-different-ctor-type.js
@@ -32,8 +32,8 @@ features: [Symbol.species, TypedArray]
var arr = [42, 43, 44];
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N(arr));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA(arr);
var other = TA === Int8Array ? Uint8Array : Int8Array;
if (typeof BigInt !== "undefined") {
other = TA === BigInt64Array ? BigUint64Array :
@@ -44,7 +44,7 @@ testWithTypedArrayConstructors(function(TA, N) {
var result = sample.slice();
- assert(compareArray(result, N(arr)), "values are set");
+ assert(compareArray(result, arr), "values are set");
assert.notSameValue(result.buffer, sample.buffer, "creates a new buffer");
assert.sameValue(result.constructor, other, "used the custom ctor");
});
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js
index d0f2d147b..d7baa426e 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-abrupt.js
@@ -26,8 +26,8 @@ includes: [testTypedArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
Object.defineProperty(sample, "constructor", {
get: function() {
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js
index d2d7667a9..79c9df2a7 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-inherited.js
@@ -26,8 +26,8 @@ includes: [testTypedArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js
index 9910c9b4e..c048632f2 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor-returns-throws.js
@@ -28,8 +28,8 @@ includes: [testTypedArray.js]
features: [Symbol, TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
sample.constructor = 42;
assert.throws(TypeError, function() {
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js
index ca237fb6d..c09681ec0 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-ctor.js
@@ -26,8 +26,8 @@ includes: [testTypedArray.js]
features: [TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
var calls = 0;
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js
index 15acea7c6..d1642f1b7 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-invocation.js
@@ -36,8 +36,8 @@ includes: [testTypedArray.js]
features: [Symbol.species, TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42]);
var result, ctorThis;
sample.constructor = {};
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js
index 6b95f571b..7bb19f5df 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor-returns-another-instance.js
@@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js]
features: [Symbol.species, TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40]);
var other = new Int8Array([1, 0, 1]);
var result;
diff --git a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js
index 5a5151e72..0477a0fd4 100644
--- a/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js
+++ b/test/built-ins/TypedArray/prototype/slice/speciesctor-get-species-custom-ctor.js
@@ -36,8 +36,8 @@ includes: [testTypedArray.js, compareArray.js]
features: [Symbol.species, TypedArray]
---*/
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42]);
var calls = 0;
var result;
@@ -50,5 +50,5 @@ testWithTypedArrayConstructors(function(TA, N) {
result = sample.slice(1);
assert.sameValue(calls, 1, "ctor called once");
- assert(compareArray(result, N([41, 42])), "expected object");
+ assert(compareArray(result, [41, 42]), "expected object");
});
diff --git a/test/built-ins/TypedArray/prototype/slice/tointeger-end.js b/test/built-ins/TypedArray/prototype/slice/tointeger-end.js
index df15d831c..2a9be9406 100644
--- a/test/built-ins/TypedArray/prototype/slice/tointeger-end.js
+++ b/test/built-ins/TypedArray/prototype/slice/tointeger-end.js
@@ -20,28 +20,28 @@ var obj = {
}
};
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
assert(compareArray(sample.slice(0, false), []), "false");
- assert(compareArray(sample.slice(0, true), N([40])), "true");
+ assert(compareArray(sample.slice(0, true), [40]), "true");
assert(compareArray(sample.slice(0, NaN), []), "NaN");
assert(compareArray(sample.slice(0, null), []), "null");
- assert(compareArray(sample.slice(0, undefined), N([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.slice(0, undefined), [40, 41, 42, 43]), "undefined");
assert(compareArray(sample.slice(0, 0.6), []), "0.6");
- assert(compareArray(sample.slice(0, 1.1), N([40])), "1.1");
- assert(compareArray(sample.slice(0, 1.5), N([40])), "1.5");
+ assert(compareArray(sample.slice(0, 1.1), [40]), "1.1");
+ assert(compareArray(sample.slice(0, 1.5), [40]), "1.5");
assert(compareArray(sample.slice(0, -0.6), []), "-0.6");
- assert(compareArray(sample.slice(0, -1.1), N([40, 41, 42])), "-1.1");
- assert(compareArray(sample.slice(0, -1.5), N([40, 41, 42])), "-1.5");
+ assert(compareArray(sample.slice(0, -1.1), [40, 41, 42]), "-1.1");
+ assert(compareArray(sample.slice(0, -1.5), [40, 41, 42]), "-1.5");
- assert(compareArray(sample.slice(0, "3"), N([40, 41, 42])), "string");
+ assert(compareArray(sample.slice(0, "3"), [40, 41, 42]), "string");
assert(
compareArray(
sample.slice(0, obj),
- N([40, 41])
+ [40, 41]
),
"object"
);
diff --git a/test/built-ins/TypedArray/prototype/slice/tointeger-start.js b/test/built-ins/TypedArray/prototype/slice/tointeger-start.js
index 353ac46e2..f67ee090c 100644
--- a/test/built-ins/TypedArray/prototype/slice/tointeger-start.js
+++ b/test/built-ins/TypedArray/prototype/slice/tointeger-start.js
@@ -19,29 +19,29 @@ var obj = {
}
};
-testWithTypedArrayConstructors(function(TA, N) {
- var sample = new TA(N([40, 41, 42, 43]));
+testWithTypedArrayConstructors(function(TA) {
+ var sample = new TA([40, 41, 42, 43]);
- assert(compareArray(sample.slice(false), N([40, 41, 42, 43])), "false");
- assert(compareArray(sample.slice(true), N([41, 42, 43])), "true");
+ assert(compareArray(sample.slice(false), [40, 41, 42, 43]), "false");
+ assert(compareArray(sample.slice(true), [41, 42, 43]), "true");
- assert(compareArray(sample.slice(NaN), N([40, 41, 42, 43])), "NaN");
- assert(compareArray(sample.slice(null), N([40, 41, 42, 43])), "null");
- assert(compareArray(sample.slice(undefined), N([40, 41, 42, 43])), "undefined");
+ assert(compareArray(sample.slice(NaN), [40, 41, 42, 43]), "NaN");
+ assert(compareArray(sample.slice(null), [40, 41, 42, 43]), "null");
+ assert(compareArray(sample.slice(undefined), [40, 41, 42, 43]), "undefined");
- assert(compareArray(sample.slice(1.1), N([41, 42, 43])), "1.1");
- assert(compareArray(sample.slice(1.5), N([41, 42, 43])), "1.5");
- assert(compareArray(sample.slice(0.6), N([40, 41, 42, 43])), "0.6");
+ assert(compareArray(sample.slice(1.1), [41, 42, 43]), "1.1");
+ assert(compareArray(sample.slice(1.5), [41, 42, 43]), "1.5");
+ assert(compareArray(sample.slice(0.6), [40, 41, 42, 43]), "0.6");
- assert(compareArray(sample.slice(-1.5), N([43])), "-1.5");
- assert(compareArray(sample.slice(-1.1), N([43])), "-1.1");
- assert(compareArray(sample.slice(-0.6), N([40, 41, 42, 43])), "-0.6");
+ assert(compareArray(sample.slice(-1.5), [43]), "-1.5");
+ assert(compareArray(sample.slice(-1.1), [43]), "-1.1");
+ assert(compareArray(sample.slice(-0.6), [40, 41, 42, 43]), "-0.6");
- assert(compareArray(sample.slice("3"), N([43])), "string");
+ assert(compareArray(sample.slice("3"), [43]), "string");
assert(
compareArray(
sample.slice(obj),
- N([42, 43])
+ [42, 43]
),
"object"
);