diff options
Diffstat (limited to 'test/built-ins/TypedArray/prototype/set')
7 files changed, 0 insertions, 249 deletions
diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-func.js b/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-func.js deleted file mode 100644 index ee55b5aa4..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-func.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set -description: Throws a TypeError exception when invoked as a function -info: | - 22.2.3.22 %TypedArray%.prototype.set ( overloaded [ , offset ]) - - This function is not generic. The this value must be an object with a - [[TypedArrayName]] internal slot. -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -var set = TypedArray.prototype.set; - -assert.sameValue(typeof set, 'function'); - -assert.throws(TypeError, function() { - set(); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-method.js b/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-method.js deleted file mode 100644 index 1b0a08698..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/invoked-as-method.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set -description: Requires a [[TypedArrayName]] internal slot. -info: | - 22.2.3.22 %TypedArray%.prototype.set ( overloaded [ , offset ]) - - This function is not generic. The this value must be an object with a - [[TypedArrayName]] internal slot. -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -var TypedArrayPrototype = TypedArray.prototype; - -assert.sameValue(typeof TypedArrayPrototype.set, 'function'); - -assert.throws(TypeError, function() { - TypedArrayPrototype.set(); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/length.js b/test/built-ins/TypedArray/prototype/set/BigInt/length.js deleted file mode 100644 index 2f1001cd0..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/length.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2015 André Bargull. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-%typedarray%.prototype.set -description: > - %TypedArray%.prototype.set.length is 1. -info: | - %TypedArray%.prototype.set ( overloaded [ , offset ]) - - 17 ECMAScript Standard Built-in Objects: - Every built-in Function object, including constructors, has a length - property whose value is an integer. Unless otherwise specified, this - value is equal to the largest number of named arguments shown in the - subclause headings for the function description, including optional - parameters. However, rest parameters shown using the form “...name” - are not included in the default argument count. - - Unless otherwise specified, the length property of a built-in Function - object has the attributes { [[Writable]]: false, [[Enumerable]]: false, - [[Configurable]]: true }. -includes: [propertyHelper.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -assert.sameValue(TypedArray.prototype.set.length, 1); - -verifyNotEnumerable(TypedArray.prototype.set, "length"); -verifyNotWritable(TypedArray.prototype.set, "length"); -verifyConfigurable(TypedArray.prototype.set, "length"); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/name.js b/test/built-ins/TypedArray/prototype/set/BigInt/name.js deleted file mode 100644 index 85d386c7c..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/name.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2015 André Bargull. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-%typedarray%.prototype.set -description: > - %TypedArray%.prototype.set.name is "set". -info: | - %TypedArray%.prototype.set ( overloaded [ , offset ]) - - 17 ECMAScript Standard Built-in Objects: - Every built-in Function object, including constructors, that is not - identified as an anonymous function has a name property whose value - is a String. - - Unless otherwise specified, the name property of a built-in Function - object, if it exists, has the attributes { [[Writable]]: false, - [[Enumerable]]: false, [[Configurable]]: true }. -includes: [propertyHelper.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -assert.sameValue(TypedArray.prototype.set.name, "set"); - -verifyNotEnumerable(TypedArray.prototype.set, "name"); -verifyNotWritable(TypedArray.prototype.set, "name"); -verifyConfigurable(TypedArray.prototype.set, "name"); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/prop-desc.js b/test/built-ins/TypedArray/prototype/set/BigInt/prop-desc.js deleted file mode 100644 index ca3c8bc15..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/prop-desc.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set -description: > - "set" property of TypedArrayPrototype -info: | - ES6 section 17: Every other data property described in clauses 18 through 26 - and in Annex B.2 has the attributes { [[Writable]]: true, - [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. -includes: [propertyHelper.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -var TypedArrayPrototype = TypedArray.prototype; - -verifyNotEnumerable(TypedArrayPrototype, 'set'); -verifyWritable(TypedArrayPrototype, 'set'); -verifyConfigurable(TypedArrayPrototype, 'set'); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-object.js b/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-object.js deleted file mode 100644 index d1b6242e9..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-object.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set-overloaded-offset -description: Throws a TypeError exception when `this` is not Object -info: | - 22.2.3.23 %TypedArray%.prototype.set - - ... - 2. Let target be the this value. - 3. If Type(target) is not Object, throw a TypeError exception. - ... -includes: [testBigIntTypedArray.js] -features: [BigInt, Symbol, TypedArray] ----*/ - -var set = TypedArray.prototype.set; - -assert.throws(TypeError, function() { - set.call(undefined, []); -}, "this is undefined"); - -assert.throws(TypeError, function() { - set.call(null, []); -}, "this is null"); - -assert.throws(TypeError, function() { - set.call(undefined, new Int8Array()); -}, "this is undefined"); - -assert.throws(TypeError, function() { - set.call(null, new Int8Array()); -}, "this is null"); - -assert.throws(TypeError, function() { - set.call(42, []); -}, "this is 42"); - -assert.throws(TypeError, function() { - set.call("1", []); -}, "this is a string"); - -assert.throws(TypeError, function() { - set.call(true, []); -}, "this is true"); - -assert.throws(TypeError, function() { - set.call(false, []); -}, "this is false"); - -var s1 = Symbol("s"); -assert.throws(TypeError, function() { - set.call(s1, []); -}, "this is a Symbol"); - -assert.throws(TypeError, function() { - set.call(42, new Int8Array(1)); -}, "this is 42"); - -assert.throws(TypeError, function() { - set.call("1", new Int8Array(1)); -}, "this is a string"); - -assert.throws(TypeError, function() { - set.call(true, new Int8Array(1)); -}, "this is true"); - -assert.throws(TypeError, function() { - set.call(false, new Int8Array(1)); -}, "this is false"); - -var s2 = Symbol("s"); -assert.throws(TypeError, function() { - set.call(s2, new Int8Array(1)); -}, "this is a Symbol"); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-typedarray-instance.js b/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-typedarray-instance.js deleted file mode 100644 index 77220ea6a..000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/this-is-not-typedarray-instance.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set-overloaded-offset -description: > - Throws a TypeError exception when `this` is not a TypedArray instance -info: | - 22.2.3.23 %TypedArray%.prototype.set - - ... - 2. Let target be the this value. - 3. If Type(target) is not Object, throw a TypeError exception. - 4. If target does not have a [[TypedArrayName]] internal slot, throw a - TypeError exception. - ... -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -var set = TypedArray.prototype.set; - -assert.throws(TypeError, function() { - set.call({}, []); -}, "this is an Object"); - -assert.throws(TypeError, function() { - set.call([], []); -}, "this is an Array"); - -var ab1 = new ArrayBuffer(8); -assert.throws(TypeError, function() { - set.call(ab1, []); -}, "this is an ArrayBuffer instance"); - -var dv1 = new DataView(new ArrayBuffer(8), 0, 1); -assert.throws(TypeError, function() { - set.call(dv1, []); -}, "this is a DataView instance"); - -assert.throws(TypeError, function() { - set.call({}, new Int8Array()); -}, "this is an Object"); - -assert.throws(TypeError, function() { - set.call([], new Int8Array()); -}, "this is an Array"); - -var ab2 = new ArrayBuffer(8); -assert.throws(TypeError, function() { - set.call(ab2, new Int8Array()); -}, "this is an ArrayBuffer instance"); - -var dv2 = new DataView(new ArrayBuffer(8), 0, 1); -assert.throws(TypeError, function() { - set.call(dv2, new Int8Array()); -}, "this is a DataView instance"); |