summaryrefslogtreecommitdiff
path: root/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js')
-rw-r--r--test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js24
1 files changed, 8 insertions, 16 deletions
diff --git a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js
index 8d0c2816d..44348b90f 100644
--- a/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js
+++ b/test/built-ins/TypedArray/prototype/copyWithin/coerced-values-target.js
@@ -28,64 +28,56 @@ includes: [compareArray.js, testTypedArray.js]
testWithTypedArrayConstructors(function(TA) {
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(undefined, 1),
- [1, 2, 3, 3]
+ new TA([0, 1, 2, 3]).copyWithin(undefined, 1), [1, 2, 3, 3]
),
'undefined value coerced to 0'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(false, 1),
- [1, 2, 3, 3]
+ new TA([0, 1, 2, 3]).copyWithin(false, 1), [1, 2, 3, 3]
),
'false value coerced to 0'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(NaN, 1),
- [1, 2, 3, 3]
+ new TA([0, 1, 2, 3]).copyWithin(NaN, 1), [1, 2, 3, 3]
),
'NaN value coerced to 0'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(null, 1),
- [1, 2, 3, 3]
+ new TA([0, 1, 2, 3]).copyWithin(null, 1), [1, 2, 3, 3]
),
'null value coerced to 0'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(true, 0),
- [0, 0, 1, 2]
+ new TA([0, 1, 2, 3]).copyWithin(true, 0), [0, 0, 1, 2]
),
'true value coerced to 1'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin('1', 0),
- [0, 0, 1, 2]
+ new TA([0, 1, 2, 3]).copyWithin('1', 0), [0, 0, 1, 2]
),
'string "1" value coerced to 1'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(0.5, 1),
- [1, 2, 3, 3]
+ new TA([0, 1, 2, 3]).copyWithin(0.5, 1), [1, 2, 3, 3]
),
'0.5 float value coerced to integer 0'
);
assert(
compareArray(
- new TA([0, 1, 2, 3]).copyWithin(1.5, 0),
- [0, 0, 1, 2]
+ new TA([0, 1, 2, 3]).copyWithin(1.5, 0), [0, 0, 1, 2]
),
'1.5 float value coerced to integer 1'
);