From 2dcdba94e5ecf0be80749f8a61a5f45be7a73e86 Mon Sep 17 00:00:00 2001 From: Alexey Shvayka Date: Wed, 10 Jun 2020 23:35:25 +0300 Subject: [PATCH] Simplify tests --- .../prototype/set/BigInt/array-arg-primitive-toobject.js | 7 ++----- .../prototype/set/array-arg-primitive-toobject.js | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js index d9b8e00e35..7647c8b273 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-primitive-toobject.js @@ -31,11 +31,9 @@ testWithBigIntTypedArrayConstructors(function(TA) { ta1.set("567"); assert.compareArray(ta1, [5n, 6n, 7n, 4n], "string"); - Number.prototype.length = 1; - Number.prototype[0] = 9n; var ta2 = new TA([1n, 2n, 3n]); ta2.set(-10, 2); - assert.compareArray(ta2, [1n, 2n, 9n], "number (modified prototype)"); + assert.compareArray(ta2, [1n, 2n, 3n], "number"); var ta3 = new TA([1n]); ta3.set(false); @@ -45,8 +43,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { ta4.set(Symbol("desc"), 0); assert.compareArray(ta4, [1n, 2n], "symbol"); - BigInt.prototype.length = -8; var ta5 = new TA([1n, 2n]); ta5.set(4n, 1); - assert.compareArray(ta5, [1n, 2n], "bigint (modified prototype)"); + assert.compareArray(ta5, [1n, 2n], "bigint"); }); diff --git a/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js b/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js index 83bf1f4e97..f2bf83a2ad 100644 --- a/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js +++ b/test/built-ins/TypedArray/prototype/set/array-arg-primitive-toobject.js @@ -36,14 +36,11 @@ testWithTypedArrayConstructors(function(TA) { ta2.set(0); assert.compareArray(ta2, [1, 2, 3], "number"); - Boolean.prototype.length = 1; - Boolean.prototype[0] = 7; var ta3 = new TA([1, 2, 3]); ta3.set(true, 2); - assert.compareArray(ta3, [1, 2, 7], "boolean (modified prototype)"); + assert.compareArray(ta3, [1, 2, 3], "boolean"); - Symbol.prototype.length = -15; var ta4 = new TA([1]); ta4.set(Symbol()); - assert.compareArray(ta4, [1], "symbol (modified prototype)"); + assert.compareArray(ta4, [1], "symbol"); });