Updates a portion of the BigInt tests that need work. Ref gh-1461 (#1462)

This commit is contained in:
Rick Waldron 2018-02-27 17:45:25 -05:00 committed by Leo Balter
parent 2712807027
commit 4efdb83ae9
175 changed files with 16 additions and 5334 deletions

View File

@ -8,13 +8,12 @@ description: |
/**
* The %TypedArray% intrinsic constructor function.
*/
var TypedArray = Object.getPrototypeOf(Int8Array);
var TypedArray = Object.getPrototypeOf(BigInt64Array);
/**
* Calls the provided function for every typed array constructor.
*
* @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor.
* @param {Array} selected - An optional Array with filtered typed arrays
*/
function testWithBigIntTypedArrayConstructors(f) {
/**

View File

@ -1,29 +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.copywithin
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.5 %TypedArray%.prototype.copyWithin (target, start [, end ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var copyWithin = TypedArray.prototype.copyWithin;
assert.sameValue(typeof copyWithin, 'function');
assert.throws(TypeError, function() {
copyWithin();
});

View File

@ -1,29 +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.copywithin
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.5 %TypedArray%.prototype.copyWithin (target, start [, end ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.copyWithin, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.copyWithin();
});

View File

@ -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.copywithin
description: >
%TypedArray%.prototype.copyWithin.length is 2.
info: |
%TypedArray%.prototype.copyWithin (target, start [, end ] )
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.copyWithin.length, 2);
verifyNotEnumerable(TypedArray.prototype.copyWithin, "length");
verifyNotWritable(TypedArray.prototype.copyWithin, "length");
verifyConfigurable(TypedArray.prototype.copyWithin, "length");

View File

@ -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.copywithin
description: >
%TypedArray%.prototype.copyWithin.name is "copyWithin".
info: |
%TypedArray%.prototype.copyWithin (target, start [, end ] )
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.copyWithin.name, "copyWithin");
verifyNotEnumerable(TypedArray.prototype.copyWithin, "name");
verifyNotWritable(TypedArray.prototype.copyWithin, "name");
verifyConfigurable(TypedArray.prototype.copyWithin, "name");

View File

@ -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.copywithin
description: >
"copyWithin" 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, 'copyWithin');
verifyWritable(TypedArrayPrototype, 'copyWithin');
verifyConfigurable(TypedArrayPrototype, 'copyWithin');

View File

@ -1,50 +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.copywithin
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.5 %TypedArray%.prototype.copyWithin (target, start [ , end ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var copyWithin = TypedArray.prototype.copyWithin;
assert.throws(TypeError, function() {
copyWithin.call(undefined, 0, 0);
}, "this is undefined");
assert.throws(TypeError, function() {
copyWithin.call(null, 0, 0);
}, "this is null");
assert.throws(TypeError, function() {
copyWithin.call(42, 0, 0);
}, "this is 42");
assert.throws(TypeError, function() {
copyWithin.call("1", 0, 0);
}, "this is a string");
assert.throws(TypeError, function() {
copyWithin.call(true, 0, 0);
}, "this is true");
assert.throws(TypeError, function() {
copyWithin.call(false, 0, 0);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
copyWithin.call(s, 0, 0);
}, "this is a Symbol");

View File

@ -1,42 +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.copywithin
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.5 %TypedArray%.prototype.copyWithin (target, start [ , end ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var copyWithin = TypedArray.prototype.copyWithin;
assert.throws(TypeError, function() {
copyWithin.call({}, 0, 0);
}, "this is an Object");
assert.throws(TypeError, function() {
copyWithin.call([], 0, 0);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
copyWithin.call(ab, 0, 0);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
copyWithin.call(dv, 0, 0);
}, "this is a DataView instance");

View File

@ -1,29 +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.every
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.7 %TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var every = TypedArray.prototype.every;
assert.sameValue(typeof every, 'function');
assert.throws(TypeError, function() {
every();
});

View File

@ -1,29 +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.every
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.7 %TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.every, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.every();
});

View File

@ -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.every
description: >
%TypedArray%.prototype.every.length is 1.
info: |
%TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
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.every.length, 1);
verifyNotEnumerable(TypedArray.prototype.every, "length");
verifyNotWritable(TypedArray.prototype.every, "length");
verifyConfigurable(TypedArray.prototype.every, "length");

View File

@ -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.every
description: >
%TypedArray%.prototype.every.name is "every".
info: |
%TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
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.every.name, "every");
verifyNotEnumerable(TypedArray.prototype.every, "name");
verifyNotWritable(TypedArray.prototype.every, "name");
verifyConfigurable(TypedArray.prototype.every, "name");

View File

@ -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.every
description: >
"every" 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, 'every');
verifyWritable(TypedArrayPrototype, 'every');
verifyConfigurable(TypedArrayPrototype, 'every');

View File

@ -1,51 +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.every
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.7 %TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var every = TypedArray.prototype.every;
var callbackfn = function() {};
assert.throws(TypeError, function() {
every.call(undefined, callbackfn);
}, "this is undefined");
assert.throws(TypeError, function() {
every.call(null, callbackfn);
}, "this is null");
assert.throws(TypeError, function() {
every.call(42, callbackfn);
}, "this is 42");
assert.throws(TypeError, function() {
every.call("1", callbackfn);
}, "this is a string");
assert.throws(TypeError, function() {
every.call(true, callbackfn);
}, "this is true");
assert.throws(TypeError, function() {
every.call(false, callbackfn);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
every.call(s, callbackfn);
}, "this is a Symbol");

View File

@ -1,43 +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.every
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.7 %TypedArray%.prototype.every ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var every = TypedArray.prototype.every;
var callbackfn = function() {};
assert.throws(TypeError, function() {
every.call({}, callbackfn);
}, "this is an Object");
assert.throws(TypeError, function() {
every.call([], callbackfn);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
every.call(ab, callbackfn);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
every.call(dv, callbackfn);
}, "this is a DataView instance");

View File

@ -1,29 +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.fill
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var fill = TypedArray.prototype.fill;
assert.sameValue(typeof fill, 'function');
assert.throws(TypeError, function() {
fill();
});

View File

@ -1,29 +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.fill
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.fill, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.fill();
});

View File

@ -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.fill
description: >
%TypedArray%.prototype.fill.length is 1.
info: |
%TypedArray%.prototype.fill (value [ , start [ , end ] ] )
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.fill.length, 1);
verifyNotEnumerable(TypedArray.prototype.fill, "length");
verifyNotWritable(TypedArray.prototype.fill, "length");
verifyConfigurable(TypedArray.prototype.fill, "length");

View File

@ -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.fill
description: >
%TypedArray%.prototype.fill.name is "fill".
info: |
%TypedArray%.prototype.fill (value [ , start [ , end ] ] )
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.fill.name, "fill");
verifyNotEnumerable(TypedArray.prototype.fill, "name");
verifyNotWritable(TypedArray.prototype.fill, "name");
verifyConfigurable(TypedArray.prototype.fill, "name");

View File

@ -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.fill
description: >
"fill" 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, 'fill');
verifyWritable(TypedArrayPrototype, 'fill');
verifyConfigurable(TypedArrayPrototype, 'fill');

View File

@ -1,50 +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.fill
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var fill = TypedArray.prototype.fill;
assert.throws(TypeError, function() {
fill.call(undefined, 0);
}, "this is undefined");
assert.throws(TypeError, function() {
fill.call(null, 0);
}, "this is null");
assert.throws(TypeError, function() {
fill.call(42, 0);
}, "this is 42");
assert.throws(TypeError, function() {
fill.call("1", 0);
}, "this is a string");
assert.throws(TypeError, function() {
fill.call(true, 0);
}, "this is true");
assert.throws(TypeError, function() {
fill.call(false, 0);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
fill.call(s, 0);
}, "this is a Symbol");

View File

@ -1,42 +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.fill
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var fill = TypedArray.prototype.fill;
assert.throws(TypeError, function() {
fill.call({}, 0);
}, "this is an Object");
assert.throws(TypeError, function() {
fill.call([], 0);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
fill.call(ab, 0);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
fill.call(dv, 0);
}, "this is a DataView instance");

View File

@ -1,30 +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.filter
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.9 %TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var filter = TypedArray.prototype.filter;
assert.sameValue(typeof filter, 'function');
assert.throws(TypeError, function() {
filter();
});

View File

@ -1,30 +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.filter
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.9 %TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.filter, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.filter();
});

View File

@ -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.filter
description: >
%TypedArray%.prototype.filter.length is 1.
info: |
%TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
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.filter.length, 1);
verifyNotEnumerable(TypedArray.prototype.filter, "length");
verifyNotWritable(TypedArray.prototype.filter, "length");
verifyConfigurable(TypedArray.prototype.filter, "length");

View File

@ -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.filter
description: >
%TypedArray%.prototype.filter.name is "filter".
info: |
%TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
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.filter.name, "filter");
verifyNotEnumerable(TypedArray.prototype.filter, "name");
verifyNotWritable(TypedArray.prototype.filter, "name");
verifyConfigurable(TypedArray.prototype.filter, "name");

View File

@ -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.filter
description: >
"filter" 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, 'filter');
verifyWritable(TypedArrayPrototype, 'filter');
verifyConfigurable(TypedArrayPrototype, 'filter');

View File

@ -1,53 +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.filter
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.9 %TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
The following steps are taken:
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var filter = TypedArray.prototype.filter;
var callbackfn = function() {};
assert.throws(TypeError, function() {
filter.call(undefined, callbackfn);
}, "this is undefined");
assert.throws(TypeError, function() {
filter.call(null, callbackfn);
}, "this is null");
assert.throws(TypeError, function() {
filter.call(42, callbackfn);
}, "this is 42");
assert.throws(TypeError, function() {
filter.call("1", callbackfn);
}, "this is a string");
assert.throws(TypeError, function() {
filter.call(true, callbackfn);
}, "this is true");
assert.throws(TypeError, function() {
filter.call(false, callbackfn);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
filter.call(s, callbackfn);
}, "this is a Symbol");

View File

@ -1,45 +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.filter
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.9 %TypedArray%.prototype.filter ( callbackfn [ , thisArg ] )
The following steps are taken:
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var filter = TypedArray.prototype.filter;
var callbackfn = function() {};
assert.throws(TypeError, function() {
filter.call({}, callbackfn);
}, "this is an Object");
assert.throws(TypeError, function() {
filter.call([], callbackfn);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
filter.call(ab, callbackfn);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
filter.call(dv, callbackfn);
}, "this is a DataView instance");

View File

@ -1,29 +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.find
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.10 %TypedArray%.prototype.find (predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var find = TypedArray.prototype.find;
assert.sameValue(typeof find, 'function');
assert.throws(TypeError, function() {
find();
});

View File

@ -1,29 +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.find
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.10 %TypedArray%.prototype.find (predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.find, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.find();
});

View File

@ -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.find
description: >
%TypedArray%.prototype.find.length is 1.
info: |
%TypedArray%.prototype.find (predicate [ , thisArg ] )
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.find.length, 1);
verifyNotEnumerable(TypedArray.prototype.find, "length");
verifyNotWritable(TypedArray.prototype.find, "length");
verifyConfigurable(TypedArray.prototype.find, "length");

View File

@ -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.find
description: >
%TypedArray%.prototype.find.name is "find".
info: |
%TypedArray%.prototype.find (predicate [ , thisArg ] )
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.find.name, "find");
verifyNotEnumerable(TypedArray.prototype.find, "name");
verifyNotWritable(TypedArray.prototype.find, "name");
verifyConfigurable(TypedArray.prototype.find, "name");

View File

@ -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.find
description: >
"find" 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, 'find');
verifyWritable(TypedArrayPrototype, 'find');
verifyConfigurable(TypedArrayPrototype, 'find');

View File

@ -1,51 +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.find
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.10 %TypedArray%.prototype.find (predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var find = TypedArray.prototype.find;
var predicate = function() {};
assert.throws(TypeError, function() {
find.call(undefined, predicate);
}, "this is undefined");
assert.throws(TypeError, function() {
find.call(null, predicate);
}, "this is null");
assert.throws(TypeError, function() {
find.call(42, predicate);
}, "this is 42");
assert.throws(TypeError, function() {
find.call("1", predicate);
}, "this is a string");
assert.throws(TypeError, function() {
find.call(true, predicate);
}, "this is true");
assert.throws(TypeError, function() {
find.call(false, predicate);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
find.call(s, predicate);
}, "this is a Symbol");

View File

@ -1,43 +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.find
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.10 %TypedArray%.prototype.find (predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var find = TypedArray.prototype.find;
var predicate = function() {};
assert.throws(TypeError, function() {
find.call({}, predicate);
}, "this is an Object");
assert.throws(TypeError, function() {
find.call([], predicate);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
find.call(ab, predicate);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
find.call(dv, predicate);
}, "this is a DataView instance");

View File

@ -1,29 +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.findindex
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.11 %TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var findIndex = TypedArray.prototype.findIndex;
assert.sameValue(typeof findIndex, 'function');
assert.throws(TypeError, function() {
findIndex();
});

View File

@ -1,29 +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.findindex
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.11 %TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.findIndex, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.findIndex();
});

View File

@ -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.findindex
description: >
%TypedArray%.prototype.findIndex.length is 1.
info: |
%TypedArray%.prototype.findIndex (predicate [ , thisArg ] )
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.findIndex.length, 1);
verifyNotEnumerable(TypedArray.prototype.findIndex, "length");
verifyNotWritable(TypedArray.prototype.findIndex, "length");
verifyConfigurable(TypedArray.prototype.findIndex, "length");

View File

@ -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.findindex
description: >
%TypedArray%.prototype.findIndex.name is "findIndex".
info: |
%TypedArray%.prototype.findIndex (predicate [ , thisArg ] )
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.findIndex.name, "findIndex");
verifyNotEnumerable(TypedArray.prototype.findIndex, "name");
verifyNotWritable(TypedArray.prototype.findIndex, "name");
verifyConfigurable(TypedArray.prototype.findIndex, "name");

View File

@ -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.findindex
description: >
"findIndex" 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, 'findIndex');
verifyWritable(TypedArrayPrototype, 'findIndex');
verifyConfigurable(TypedArrayPrototype, 'findIndex');

View File

@ -1,51 +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.findindex
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.11 %TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var findIndex = TypedArray.prototype.findIndex;
var predicate = function() {};
assert.throws(TypeError, function() {
findIndex.call(undefined, predicate);
}, "this is undefined");
assert.throws(TypeError, function() {
findIndex.call(null, predicate);
}, "this is null");
assert.throws(TypeError, function() {
findIndex.call(42, predicate);
}, "this is 42");
assert.throws(TypeError, function() {
findIndex.call("1", predicate);
}, "this is a string");
assert.throws(TypeError, function() {
findIndex.call(true, predicate);
}, "this is true");
assert.throws(TypeError, function() {
findIndex.call(false, predicate);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
findIndex.call(s, predicate);
}, "this is a Symbol");

View File

@ -1,43 +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.findindex
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.11 %TypedArray%.prototype.findIndex ( predicate [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var findIndex = TypedArray.prototype.findIndex;
var predicate = function() {};
assert.throws(TypeError, function() {
findIndex.call({}, predicate);
}, "this is an Object");
assert.throws(TypeError, function() {
findIndex.call([], predicate);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
findIndex.call(ab, predicate);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
findIndex.call(dv, predicate);
}, "this is a DataView instance");

View File

@ -1,29 +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.foreach
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.12 %TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var forEach = TypedArray.prototype.forEach;
assert.sameValue(typeof forEach, 'function');
assert.throws(TypeError, function() {
forEach();
});

View File

@ -1,29 +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.foreach
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.12 %TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.forEach, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.forEach();
});

View File

@ -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.foreach
description: >
%TypedArray%.prototype.forEach.length is 1.
info: |
%TypedArray%.prototype.forEach (callbackfn [ , thisArg ] )
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.forEach.length, 1);
verifyNotEnumerable(TypedArray.prototype.forEach, "length");
verifyNotWritable(TypedArray.prototype.forEach, "length");
verifyConfigurable(TypedArray.prototype.forEach, "length");

View File

@ -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.foreach
description: >
%TypedArray%.prototype.forEach.name is "forEach".
info: |
%TypedArray%.prototype.forEach (callbackfn [ , thisArg ] )
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.forEach.name, "forEach");
verifyNotEnumerable(TypedArray.prototype.forEach, "name");
verifyNotWritable(TypedArray.prototype.forEach, "name");
verifyConfigurable(TypedArray.prototype.forEach, "name");

View File

@ -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.foreach
description: >
"forEach" 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, 'forEach');
verifyWritable(TypedArrayPrototype, 'forEach');
verifyConfigurable(TypedArrayPrototype, 'forEach');

View File

@ -1,51 +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.foreach
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.12 %TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var forEach = TypedArray.prototype.forEach;
var callbackfn = function() {};
assert.throws(TypeError, function() {
forEach.call(undefined, callbackfn);
}, "this is undefined");
assert.throws(TypeError, function() {
forEach.call(null, callbackfn);
}, "this is null");
assert.throws(TypeError, function() {
forEach.call(42, callbackfn);
}, "this is 42");
assert.throws(TypeError, function() {
forEach.call("1", callbackfn);
}, "this is a string");
assert.throws(TypeError, function() {
forEach.call(true, callbackfn);
}, "this is true");
assert.throws(TypeError, function() {
forEach.call(false, callbackfn);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
forEach.call(s, callbackfn);
}, "this is a Symbol");

View File

@ -1,43 +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.foreach
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.12 %TypedArray%.prototype.forEach ( callbackfn [ , thisArg ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var forEach = TypedArray.prototype.forEach;
var callbackfn = function() {};
assert.throws(TypeError, function() {
forEach.call({}, callbackfn);
}, "this is an Object");
assert.throws(TypeError, function() {
forEach.call([], callbackfn);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
forEach.call(ab, callbackfn);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
forEach.call(dv, callbackfn);
}, "this is a DataView instance");

View File

@ -1,29 +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.includes
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.14 %TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var includes = TypedArray.prototype.includes;
assert.sameValue(typeof includes, "function");
assert.throws(TypeError, function() {
includes();
});

View File

@ -1,29 +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.includes
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.14 %TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.includes, "function");
assert.throws(TypeError, function() {
TypedArrayPrototype.includes();
});

View File

@ -1,30 +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.includes
description: >
%TypedArray%.prototype.includes.length is 1.
info: |
%TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )
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.includes.length, 1);
verifyNotEnumerable(TypedArray.prototype.includes, "length");
verifyNotWritable(TypedArray.prototype.includes, "length");
verifyConfigurable(TypedArray.prototype.includes, "length");

View File

@ -1,27 +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.includes
description: >
%TypedArray%.prototype.includes.name is "includes".
info: |
%TypedArray%.prototype.includes (searchElement [ , fromIndex ] )
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.includes.name, "includes");
verifyNotEnumerable(TypedArray.prototype.includes, "name");
verifyNotWritable(TypedArray.prototype.includes, "name");
verifyConfigurable(TypedArray.prototype.includes, "name");

View File

@ -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.includes
description: >
"includes" 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, "includes");
verifyWritable(TypedArrayPrototype, "includes");
verifyConfigurable(TypedArrayPrototype, "includes");

View File

@ -1,50 +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.includes
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.14 %TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var includes = TypedArray.prototype.includes;
assert.throws(TypeError, function() {
includes.call(undefined, 42);
}, "this is undefined");
assert.throws(TypeError, function() {
includes.call(null, 42);
}, "this is null");
assert.throws(TypeError, function() {
includes.call(42, 42);
}, "this is 42");
assert.throws(TypeError, function() {
includes.call("1", 42);
}, "this is a string");
assert.throws(TypeError, function() {
includes.call(true, 42);
}, "this is true");
assert.throws(TypeError, function() {
includes.call(false, 42);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
includes.call(s, 42);
}, "this is a Symbol");

View File

@ -1,42 +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.includes
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.14 %TypedArray%.prototype.includes ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var includes = TypedArray.prototype.includes;
assert.throws(TypeError, function() {
includes.call({}, 42);
}, "this is an Object");
assert.throws(TypeError, function() {
includes.call([], 42);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
includes.call(ab, 42);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
includes.call(dv, 42);
}, "this is a DataView instance");

View File

@ -1,29 +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.indexof
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.13 %TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var indexOf = TypedArray.prototype.indexOf;
assert.sameValue(typeof indexOf, 'function');
assert.throws(TypeError, function() {
indexOf();
});

View File

@ -1,29 +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.indexof
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.13 %TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.indexOf, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.indexOf();
});

View File

@ -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.indexof
description: >
%TypedArray%.prototype.indexOf.length is 1.
info: |
%TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
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.indexOf.length, 1);
verifyNotEnumerable(TypedArray.prototype.indexOf, "length");
verifyNotWritable(TypedArray.prototype.indexOf, "length");
verifyConfigurable(TypedArray.prototype.indexOf, "length");

View File

@ -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.indexof
description: >
%TypedArray%.prototype.indexOf.name is "indexOf".
info: |
%TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
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.indexOf.name, "indexOf");
verifyNotEnumerable(TypedArray.prototype.indexOf, "name");
verifyNotWritable(TypedArray.prototype.indexOf, "name");
verifyConfigurable(TypedArray.prototype.indexOf, "name");

View File

@ -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.indexof
description: >
"indexOf" 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, 'indexOf');
verifyWritable(TypedArrayPrototype, 'indexOf');
verifyConfigurable(TypedArrayPrototype, 'indexOf');

View File

@ -1,50 +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.indexof
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.13 %TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var indexOf = TypedArray.prototype.indexOf;
assert.throws(TypeError, function() {
indexOf.call(undefined, 42);
}, "this is undefined");
assert.throws(TypeError, function() {
indexOf.call(null, 42);
}, "this is null");
assert.throws(TypeError, function() {
indexOf.call(42, 42);
}, "this is 42");
assert.throws(TypeError, function() {
indexOf.call("1", 42);
}, "this is a string");
assert.throws(TypeError, function() {
indexOf.call(true, 42);
}, "this is true");
assert.throws(TypeError, function() {
indexOf.call(false, 42);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
indexOf.call(s, 42);
}, "this is a Symbol");

View File

@ -1,42 +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.indexof
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.13 %TypedArray%.prototype.indexOf (searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var indexOf = TypedArray.prototype.indexOf;
assert.throws(TypeError, function() {
indexOf.call({}, 42);
}, "this is an Object");
assert.throws(TypeError, function() {
indexOf.call([], 42);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
indexOf.call(ab, 42);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
indexOf.call(dv, 42);
}, "this is a DataView instance");

View File

@ -1,29 +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.join
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.14 %TypedArray%.prototype.join ( separator )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var join = TypedArray.prototype.join;
assert.sameValue(typeof join, 'function');
assert.throws(TypeError, function() {
join();
});

View File

@ -1,29 +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.join
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.14 %TypedArray%.prototype.join ( separator )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.join, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.join();
});

View File

@ -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.join
description: >
%TypedArray%.prototype.join.length is 1.
info: |
%TypedArray%.prototype.join ( separator )
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.join.length, 1);
verifyNotEnumerable(TypedArray.prototype.join, "length");
verifyNotWritable(TypedArray.prototype.join, "length");
verifyConfigurable(TypedArray.prototype.join, "length");

View File

@ -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.join
description: >
%TypedArray%.prototype.join.name is "join".
info: |
%TypedArray%.prototype.join ( separator )
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.join.name, "join");
verifyNotEnumerable(TypedArray.prototype.join, "name");
verifyNotWritable(TypedArray.prototype.join, "name");
verifyConfigurable(TypedArray.prototype.join, "name");

View File

@ -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.join
description: >
"join" 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, 'join');
verifyWritable(TypedArrayPrototype, 'join');
verifyConfigurable(TypedArrayPrototype, 'join');

View File

@ -1,50 +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.join
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.15 %TypedArray%.prototype.join ( separator )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var join = TypedArray.prototype.join;
assert.throws(TypeError, function() {
join.call(undefined, "");
}, "this is undefined");
assert.throws(TypeError, function() {
join.call(null, "");
}, "this is null");
assert.throws(TypeError, function() {
join.call(42, "");
}, "this is 42");
assert.throws(TypeError, function() {
join.call("1", "");
}, "this is a string");
assert.throws(TypeError, function() {
join.call(true, "");
}, "this is true");
assert.throws(TypeError, function() {
join.call(false, "");
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
join.call(s, "");
}, "this is a Symbol");

View File

@ -1,42 +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.join
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.15 %TypedArray%.prototype.join ( separator )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var join = TypedArray.prototype.join;
assert.throws(TypeError, function() {
join.call({}, "");
}, "this is an Object");
assert.throws(TypeError, function() {
join.call([], "");
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
join.call(ab, "");
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
join.call(dv, "");
}, "this is a DataView instance");

View File

@ -1,30 +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.keys
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.15 %TypedArray%.prototype.keys ( )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var keys = TypedArray.prototype.keys;
assert.sameValue(typeof keys, 'function');
assert.throws(TypeError, function() {
keys();
});

View File

@ -1,30 +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.keys
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.15 %TypedArray%.prototype.keys ( )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.keys, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.keys();
});

View File

@ -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.keys
description: >
%TypedArray%.prototype.keys.length is 0.
info: |
%TypedArray%.prototype.keys ( )
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.keys.length, 0);
verifyNotEnumerable(TypedArray.prototype.keys, "length");
verifyNotWritable(TypedArray.prototype.keys, "length");
verifyConfigurable(TypedArray.prototype.keys, "length");

View File

@ -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.keys
description: >
%TypedArray%.prototype.keys.name is "keys".
info: |
%TypedArray%.prototype.keys ( )
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.keys.name, "keys");
verifyNotEnumerable(TypedArray.prototype.keys, "name");
verifyNotWritable(TypedArray.prototype.keys, "name");
verifyConfigurable(TypedArray.prototype.keys, "name");

View File

@ -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.keys
description: >
"keys" 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, 'keys');
verifyWritable(TypedArrayPrototype, 'keys');
verifyConfigurable(TypedArrayPrototype, 'keys');

View File

@ -1,52 +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.keys
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.16 %TypedArray%.prototype.keys ( )
The following steps are taken:
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var keys = TypedArray.prototype.keys;
assert.throws(TypeError, function() {
keys.call(undefined);
}, "this is undefined");
assert.throws(TypeError, function() {
keys.call(null);
}, "this is null");
assert.throws(TypeError, function() {
keys.call(42);
}, "this is 42");
assert.throws(TypeError, function() {
keys.call("1");
}, "this is a string");
assert.throws(TypeError, function() {
keys.call(true);
}, "this is true");
assert.throws(TypeError, function() {
keys.call(false);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
keys.call(s);
}, "this is a Symbol");

View File

@ -1,44 +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.keys
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.16 %TypedArray%.prototype.keys ( )
The following steps are taken:
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var keys = TypedArray.prototype.keys;
assert.throws(TypeError, function() {
keys.call({});
}, "this is an Object");
assert.throws(TypeError, function() {
keys.call([]);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
keys.call(ab);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
keys.call(dv);
}, "this is a DataView instance");

View File

@ -1,29 +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.lastindexof
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.16 %TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var lastIndexOf = TypedArray.prototype.lastIndexOf;
assert.sameValue(typeof lastIndexOf, 'function');
assert.throws(TypeError, function() {
lastIndexOf();
});

View File

@ -1,29 +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.lastindexof
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.16 %TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.lastIndexOf, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.lastIndexOf();
});

View File

@ -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.lastindexof
description: >
%TypedArray%.prototype.lastIndexOf.length is 1.
info: |
%TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
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.lastIndexOf.length, 1);
verifyNotEnumerable(TypedArray.prototype.lastIndexOf, "length");
verifyNotWritable(TypedArray.prototype.lastIndexOf, "length");
verifyConfigurable(TypedArray.prototype.lastIndexOf, "length");

View File

@ -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.lastindexof
description: >
%TypedArray%.prototype.lastIndexOf.name is "lastIndexOf".
info: |
%TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
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.lastIndexOf.name, "lastIndexOf");
verifyNotEnumerable(TypedArray.prototype.lastIndexOf, "name");
verifyNotWritable(TypedArray.prototype.lastIndexOf, "name");
verifyConfigurable(TypedArray.prototype.lastIndexOf, "name");

View File

@ -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.lastindexof
description: >
"lastIndexOf" 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, 'lastIndexOf');
verifyWritable(TypedArrayPrototype, 'lastIndexOf');
verifyConfigurable(TypedArrayPrototype, 'lastIndexOf');

View File

@ -1,50 +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.lastindexof
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.17 %TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var lastIndexOf = TypedArray.prototype.lastIndexOf;
assert.throws(TypeError, function() {
lastIndexOf.call(undefined, 42);
}, "this is undefined");
assert.throws(TypeError, function() {
lastIndexOf.call(null, 42);
}, "this is null");
assert.throws(TypeError, function() {
lastIndexOf.call(42, 42);
}, "this is 42");
assert.throws(TypeError, function() {
lastIndexOf.call("1", 42);
}, "this is a string");
assert.throws(TypeError, function() {
lastIndexOf.call(true, 42);
}, "this is true");
assert.throws(TypeError, function() {
lastIndexOf.call(false, 42);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
lastIndexOf.call(s, 42);
}, "this is a Symbol");

View File

@ -1,42 +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.lastindexof
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.17 %TypedArray%.prototype.lastIndexOf ( searchElement [ , fromIndex ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var lastIndexOf = TypedArray.prototype.lastIndexOf;
assert.throws(TypeError, function() {
lastIndexOf.call({}, 42);
}, "this is an Object");
assert.throws(TypeError, function() {
lastIndexOf.call([], 42);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
lastIndexOf.call(ab, 42);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
lastIndexOf.call(dv, 42);
}, "this is a DataView instance");

View File

@ -1,30 +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.map
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.18 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var map = TypedArray.prototype.map;
assert.sameValue(typeof map, 'function');
assert.throws(TypeError, function() {
map();
});

View File

@ -1,30 +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.map
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.18 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Let valid be ValidateTypedArray(O).
3. ReturnIfAbrupt(valid).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.map, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.map();
});

View File

@ -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.map
description: >
%TypedArray%.prototype.map.length is 1.
info: |
%TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
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.map.length, 1);
verifyNotEnumerable(TypedArray.prototype.map, "length");
verifyNotWritable(TypedArray.prototype.map, "length");
verifyConfigurable(TypedArray.prototype.map, "length");

View File

@ -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.map
description: >
%TypedArray%.prototype.map.name is "map".
info: |
%TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
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.map.name, "map");
verifyNotEnumerable(TypedArray.prototype.map, "name");
verifyNotWritable(TypedArray.prototype.map, "name");
verifyConfigurable(TypedArray.prototype.map, "name");

View File

@ -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.map
description: >
"map" 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, 'map');
verifyWritable(TypedArrayPrototype, 'map');
verifyConfigurable(TypedArrayPrototype, 'map');

View File

@ -1,51 +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.map
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var map = TypedArray.prototype.map;
var callbackfn = function() {};
assert.throws(TypeError, function() {
map.call(undefined, callbackfn);
}, "this is undefined");
assert.throws(TypeError, function() {
map.call(null, callbackfn);
}, "this is null");
assert.throws(TypeError, function() {
map.call(42, callbackfn);
}, "this is 42");
assert.throws(TypeError, function() {
map.call("1", callbackfn);
}, "this is a string");
assert.throws(TypeError, function() {
map.call(true, callbackfn);
}, "this is true");
assert.throws(TypeError, function() {
map.call(false, callbackfn);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
map.call(s, callbackfn);
}, "this is a Symbol");

View File

@ -1,43 +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.map
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] )
1. Let O be the this value.
2. Perform ? ValidateTypedArray(O).
...
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var map = TypedArray.prototype.map;
var callbackfn = function() {};
assert.throws(TypeError, function() {
map.call({}, callbackfn);
}, "this is an Object");
assert.throws(TypeError, function() {
map.call([], callbackfn);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
map.call(ab, callbackfn);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
map.call(dv, callbackfn);
}, "this is a DataView instance");

View File

@ -1,30 +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.reduce
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.19 %TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )
...
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var reduce = TypedArray.prototype.reduce;
assert.sameValue(typeof reduce, 'function');
assert.throws(TypeError, function() {
reduce();
});

View File

@ -1,30 +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.reduce
description: Requires a [[TypedArrayName]] internal slot.
info: |
22.2.3.19 %TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )
...
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var TypedArrayPrototype = TypedArray.prototype;
assert.sameValue(typeof TypedArrayPrototype.reduce, 'function');
assert.throws(TypeError, function() {
TypedArrayPrototype.reduce();
});

View File

@ -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.reduce
description: >
%TypedArray%.prototype.reduce.length is 1.
info: |
%TypedArray%.prototype.reduce ( callbackfn [ , thisArg ] )
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.reduce.length, 1);
verifyNotEnumerable(TypedArray.prototype.reduce, "length");
verifyNotWritable(TypedArray.prototype.reduce, "length");
verifyConfigurable(TypedArray.prototype.reduce, "length");

View File

@ -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.reduce
description: >
%TypedArray%.prototype.reduce.name is "reduce".
info: |
%TypedArray%.prototype.reduce ( callbackfn [ , thisArg ] )
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.reduce.name, "reduce");
verifyNotEnumerable(TypedArray.prototype.reduce, "name");
verifyNotWritable(TypedArray.prototype.reduce, "name");
verifyConfigurable(TypedArray.prototype.reduce, "name");

View File

@ -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.reduce
description: >
"reduce" 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, 'reduce');
verifyWritable(TypedArrayPrototype, 'reduce');
verifyConfigurable(TypedArrayPrototype, 'reduce');

View File

@ -1,51 +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.reduce
description: Throws a TypeError exception when `this` is not Object
info: |
22.2.3.20 %TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, Symbol, TypedArray]
---*/
var reduce = TypedArray.prototype.reduce;
var callbackfn = function() {};
assert.throws(TypeError, function() {
reduce.call(undefined, callbackfn);
}, "this is undefined");
assert.throws(TypeError, function() {
reduce.call(null, callbackfn);
}, "this is null");
assert.throws(TypeError, function() {
reduce.call(42, callbackfn);
}, "this is 42");
assert.throws(TypeError, function() {
reduce.call("1", callbackfn);
}, "this is a string");
assert.throws(TypeError, function() {
reduce.call(true, callbackfn);
}, "this is true");
assert.throws(TypeError, function() {
reduce.call(false, callbackfn);
}, "this is false");
var s = Symbol("s");
assert.throws(TypeError, function() {
reduce.call(s, callbackfn);
}, "this is a Symbol");

View File

@ -1,43 +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.reduce
description: >
Throws a TypeError exception when `this` is not a TypedArray instance
info: |
22.2.3.20 %TypedArray%.prototype.reduce ( callbackfn [ , initialValue ] )
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var reduce = TypedArray.prototype.reduce;
var callbackfn = function() {};
assert.throws(TypeError, function() {
reduce.call({}, callbackfn);
}, "this is an Object");
assert.throws(TypeError, function() {
reduce.call([], callbackfn);
}, "this is an Array");
var ab = new ArrayBuffer(8);
assert.throws(TypeError, function() {
reduce.call(ab, callbackfn);
}, "this is an ArrayBuffer instance");
var dv = new DataView(new ArrayBuffer(8), 0, 1);
assert.throws(TypeError, function() {
reduce.call(dv, callbackfn);
}, "this is a DataView instance");

View File

@ -1,30 +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.reduceright
description: Throws a TypeError exception when invoked as a function
info: |
22.2.3.20 %TypedArray%.prototype.reduceRight ( callbackfn [ , initialValue ] )
...
This function is not generic. ValidateTypedArray is applied to the this value
prior to evaluating the algorithm. If its result is an abrupt completion that
exception is thrown instead of evaluating the algorithm.
22.2.3.5.1 Runtime Semantics: ValidateTypedArray ( O )
1. If Type(O) is not Object, throw a TypeError exception.
2. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
exception.
...
includes: [testBigIntTypedArray.js]
features: [BigInt, TypedArray]
---*/
var reduceRight = TypedArray.prototype.reduceRight;
assert.sameValue(typeof reduceRight, 'function');
assert.throws(TypeError, function() {
reduceRight();
});

Some files were not shown because too many files have changed in this diff Show More