mirror of https://github.com/tc39/test262.git
Remove duplicates
This commit is contained in:
parent
258da539bc
commit
7375dcb080
|
@ -1,23 +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-get-%typedarray%.prototype.length
|
|
||||||
description: >
|
|
||||||
Requires this value to have a [[ViewedArrayBuffer]] internal slot
|
|
||||||
info: |
|
|
||||||
22.2.3.17 get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
1. Let O be the this value.
|
|
||||||
...
|
|
||||||
3. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
|
|
||||||
exception.
|
|
||||||
...
|
|
||||||
includes: [testBigIntTypedArray.js]
|
|
||||||
features: [BigInt, TypedArray]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var TypedArrayPrototype = TypedArray.prototype;
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
TypedArrayPrototype.length;
|
|
||||||
});
|
|
|
@ -1,23 +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-get-%typedarray%.prototype.length
|
|
||||||
description: Throws a TypeError exception when invoked as a function
|
|
||||||
info: |
|
|
||||||
22.2.3.17 get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
1. Let O be the this value.
|
|
||||||
2. If Type(O) is not Object, throw a TypeError exception.
|
|
||||||
...
|
|
||||||
includes: [testBigIntTypedArray.js]
|
|
||||||
features: [BigInt, TypedArray]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var TypedArrayPrototype = TypedArray.prototype;
|
|
||||||
var getter = Object.getOwnPropertyDescriptor(
|
|
||||||
TypedArrayPrototype, 'length'
|
|
||||||
).get;
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter();
|
|
||||||
});
|
|
|
@ -1,32 +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-get-%typedarray%.prototype.length
|
|
||||||
description: >
|
|
||||||
get %TypedArray%.prototype.length.length is 0.
|
|
||||||
info: |
|
|
||||||
get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
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]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(TypedArray.prototype, "length");
|
|
||||||
|
|
||||||
assert.sameValue(desc.get.length, 0);
|
|
||||||
|
|
||||||
verifyNotEnumerable(desc.get, "length");
|
|
||||||
verifyNotWritable(desc.get, "length");
|
|
||||||
verifyConfigurable(desc.get, "length");
|
|
|
@ -1,29 +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-get-%typedarray%.prototype.length
|
|
||||||
description: >
|
|
||||||
get %TypedArray%.prototype.length.name is "get length".
|
|
||||||
info: |
|
|
||||||
get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
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]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(TypedArray.prototype, "length");
|
|
||||||
|
|
||||||
assert.sameValue(desc.get.name, "get length");
|
|
||||||
|
|
||||||
verifyNotEnumerable(desc.get, "name");
|
|
||||||
verifyNotWritable(desc.get, "name");
|
|
||||||
verifyConfigurable(desc.get, "name");
|
|
|
@ -1,24 +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-get-%typedarray%.prototype.length
|
|
||||||
description: >
|
|
||||||
"length" property of TypedArrayPrototype
|
|
||||||
info: |
|
|
||||||
%TypedArray%.prototype.length is an accessor property whose set accessor
|
|
||||||
function is undefined.
|
|
||||||
|
|
||||||
Section 17: Every accessor property described in clauses 18 through 26 and in
|
|
||||||
Annex B.2 has the attributes {[[Enumerable]]: false, [[Configurable]]: true }
|
|
||||||
includes: [propertyHelper.js, testBigIntTypedArray.js]
|
|
||||||
features: [BigInt, TypedArray]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var TypedArrayPrototype = TypedArray.prototype;
|
|
||||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, "length");
|
|
||||||
|
|
||||||
assert.sameValue(desc.set, undefined);
|
|
||||||
assert.sameValue(typeof desc.get, "function");
|
|
||||||
|
|
||||||
verifyNotEnumerable(TypedArrayPrototype, "length");
|
|
||||||
verifyConfigurable(TypedArrayPrototype, "length");
|
|
|
@ -1,41 +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-get-%typedarray%.prototype.length
|
|
||||||
description: >
|
|
||||||
Throws a TypeError exception when `this` does not have a [[TypedArrayName]]
|
|
||||||
internal slot
|
|
||||||
info: |
|
|
||||||
22.2.3.18 get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
1. Let O be the this value.
|
|
||||||
2. If Type(O) is not Object, throw a TypeError exception.
|
|
||||||
3. If O does not have a [[TypedArrayName]] internal slot, throw a TypeError
|
|
||||||
exception.
|
|
||||||
...
|
|
||||||
includes: [testBigIntTypedArray.js]
|
|
||||||
features: [BigInt, DataView, TypedArray]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var TypedArrayPrototype = TypedArray.prototype;
|
|
||||||
var getter = Object.getOwnPropertyDescriptor(
|
|
||||||
TypedArrayPrototype, "length"
|
|
||||||
).get;
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call({});
|
|
||||||
});
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call([]);
|
|
||||||
});
|
|
||||||
|
|
||||||
var ab = new ArrayBuffer(8);
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(ab);
|
|
||||||
});
|
|
||||||
|
|
||||||
var dv = new DataView(new ArrayBuffer(8), 0);
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(dv);
|
|
||||||
});
|
|
|
@ -1,49 +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-get-%typedarray%.prototype.length
|
|
||||||
description: Throws a TypeError exception when `this` is not Object
|
|
||||||
info: |
|
|
||||||
22.2.3.18 get %TypedArray%.prototype.length
|
|
||||||
|
|
||||||
1. Let O be the this value.
|
|
||||||
2. If Type(O) is not Object, throw a TypeError exception.
|
|
||||||
...
|
|
||||||
includes: [testBigIntTypedArray.js]
|
|
||||||
features: [BigInt, Symbol, TypedArray]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
var TypedArrayPrototype = TypedArray.prototype;
|
|
||||||
var getter = Object.getOwnPropertyDescriptor(
|
|
||||||
TypedArrayPrototype, "length"
|
|
||||||
).get;
|
|
||||||
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(undefined);
|
|
||||||
}, "undefined");
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(null);
|
|
||||||
}, "null");
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(42);
|
|
||||||
}, "number");
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call("1");
|
|
||||||
}, "string");
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(true);
|
|
||||||
}, "true");
|
|
||||||
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(false);
|
|
||||||
}, "false");
|
|
||||||
|
|
||||||
var s = Symbol("s");
|
|
||||||
assert.throws(TypeError, function() {
|
|
||||||
getter.call(s);
|
|
||||||
}, "symbol");
|
|
Loading…
Reference in New Issue