mirror of https://github.com/tc39/test262.git
Merge pull request #517 from bocoup/typedarray-prototype
This commit is contained in:
commit
e9c7608f6f
21
test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js
vendored
Normal file
21
test/built-ins/TypedArray/prototype/Symbol.toStringTag/return-typedarrayname.js
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
// 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-@@tostringtag
|
||||
description: |
|
||||
Return value from the [[TypedArrayName]] internal slot
|
||||
info: >
|
||||
22.2.3.32 get %TypedArray%.prototype [ @@toStringTag ]
|
||||
|
||||
...
|
||||
4. Let name be the value of O's [[TypedArrayName]] internal slot.
|
||||
5. Assert: name is a String value.
|
||||
6. Return name.
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol.toStringTag]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
var ta = new TA();
|
||||
assert.sameValue(ta[Symbol.toStringTag], TA.name, "property value");
|
||||
});
|
29
test/built-ins/TypedArray/prototype/Symbol.toStringTag/this-has-no-typedarrayname-internal.js
vendored
Normal file
29
test/built-ins/TypedArray/prototype/Symbol.toStringTag/this-has-no-typedarrayname-internal.js
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
// 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-@@tostringtag
|
||||
description: >
|
||||
Return undefined when `this` does not have a [[TypedArrayName]] internal slot
|
||||
info: >
|
||||
22.2.3.32 get %TypedArray%.prototype [ @@toStringTag ]
|
||||
|
||||
1. Let O be the this value.
|
||||
...
|
||||
3. If O does not have a [[TypedArrayName]] internal slot, return undefined.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol.toStringTag, DataView]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, Symbol.toStringTag
|
||||
).get;
|
||||
|
||||
assert.sameValue(getter.call({}), undefined);
|
||||
assert.sameValue(getter.call([]), undefined);
|
||||
assert.sameValue(getter.call(new ArrayBuffer(8)), undefined);
|
||||
|
||||
var ab = new ArrayBuffer(8);
|
||||
var dv = new DataView(ab, 0, 1);
|
||||
assert.sameValue(getter.call(dv), undefined);
|
27
test/built-ins/TypedArray/prototype/Symbol.toStringTag/this-is-not-object.js
vendored
Normal file
27
test/built-ins/TypedArray/prototype/Symbol.toStringTag/this-is-not-object.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// 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-@@tostringtag
|
||||
description: Return undefined when `this` is not Object
|
||||
info: >
|
||||
22.2.3.32 get %TypedArray%.prototype [ @@toStringTag ]
|
||||
|
||||
1. Let O be the this value.
|
||||
2. If Type(O) is not Object, return undefined.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol, Symbol.toStringTag]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, Symbol.toStringTag
|
||||
).get;
|
||||
|
||||
assert.sameValue(getter.call(undefined), undefined, "this is undefined");
|
||||
assert.sameValue(getter.call(42), undefined, "this is 42");
|
||||
assert.sameValue(getter.call("foo"), undefined, "this is a string");
|
||||
assert.sameValue(getter.call(true), undefined, "this is true");
|
||||
assert.sameValue(getter.call(false), undefined, "this is false");
|
||||
assert.sameValue(getter.call(Symbol("s")), undefined, "this is a Symbol");
|
||||
assert.sameValue(getter.call(null), undefined, "this is null");
|
|
@ -7,11 +7,17 @@ description: >
|
|||
info: >
|
||||
%TypedArray%.prototype.buffer is an accessor property whose set accessor
|
||||
function is undefined.
|
||||
includes: [testTypedArray.js]
|
||||
|
||||
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, testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, 'buffer');
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, "buffer");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, 'function');
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(TypedArrayPrototype, "buffer");
|
||||
verifyConfigurable(TypedArrayPrototype, "buffer");
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.1
|
||||
description: |
|
||||
Return buffer from [[ViewedArrayBuffer]] internal slot
|
||||
info: >
|
||||
22.2.3.1 get %TypedArray%.prototype.buffer
|
||||
|
||||
...
|
||||
4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot.
|
||||
5. Return buffer.
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
var buffer = new ArrayBuffer(TA.BYTES_PER_ELEMENT);
|
||||
var ta = new TA(buffer);
|
||||
|
||||
assert.sameValue(ta.buffer, buffer);
|
||||
});
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.1
|
||||
description: |
|
||||
Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot
|
||||
info: >
|
||||
22.2.3.1 get %TypedArray%.prototype.buffer
|
||||
|
||||
...
|
||||
4. Let buffer be the value of O's [[ViewedArrayBuffer]] internal slot.
|
||||
5. Return buffer.
|
||||
includes: [testTypedArray.js]
|
||||
features: [DataView]
|
||||
---*/
|
||||
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArray.prototype, "buffer"
|
||||
).get;
|
||||
|
||||
var buffer = new ArrayBuffer(8);
|
||||
var dv = new DataView(buffer, 0);
|
||||
|
||||
assert.sameValue(getter.call(dv), buffer);
|
35
test/built-ins/TypedArray/prototype/buffer/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
35
test/built-ins/TypedArray/prototype/buffer/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.1
|
||||
description: |
|
||||
Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]]
|
||||
internal slot
|
||||
info: >
|
||||
22.2.3.1 get %TypedArray%.prototype.buffer
|
||||
|
||||
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 [[ViewedArrayBuffer]] internal slot, throw a TypeError
|
||||
exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "buffer"
|
||||
).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);
|
||||
});
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.1
|
||||
description: Throws a TypeError exception when `this` is not Object
|
||||
info: >
|
||||
22.2.3.1 get %TypedArray%.prototype.buffer
|
||||
|
||||
1. Let O be the this value.
|
||||
2. If Type(O) is not Object, throw a TypeError exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "buffer"
|
||||
).get;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(undefined);
|
||||
}, "this is undefined");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(null);
|
||||
}, "this is null");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(42);
|
||||
}, "this is 42");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call("1");
|
||||
}, "this is a string");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(true);
|
||||
}, "this is true");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(false);
|
||||
}, "this is false");
|
||||
|
||||
var s = Symbol("s");
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(s);
|
||||
}, "this is a Symbol");
|
|
@ -7,11 +7,17 @@ description: >
|
|||
info: >
|
||||
%TypedArray%.prototype.byteLength is an accessor property whose set accessor
|
||||
function is undefined.
|
||||
includes: [testTypedArray.js]
|
||||
|
||||
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, testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, 'byteLength');
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, "byteLength");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, 'function');
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(TypedArrayPrototype, "byteLength");
|
||||
verifyConfigurable(TypedArrayPrototype, "byteLength");
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.2
|
||||
description: |
|
||||
Return value from [[ByteLength]] internal slot
|
||||
info: >
|
||||
22.2.3.2 get %TypedArray%.prototype.byteLength
|
||||
|
||||
...
|
||||
6. Let size be the value of O's [[ByteLength]] internal slot.
|
||||
7. Return size.
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
var bytesPerElement = TA.BYTES_PER_ELEMENT;
|
||||
var ta1 = new TA();
|
||||
assert.sameValue(ta1.byteLength, 0);
|
||||
|
||||
var ta2 = new TA(42);
|
||||
assert.sameValue(ta2.byteLength, 42 * bytesPerElement);
|
||||
});
|
24
test/built-ins/TypedArray/prototype/byteLength/return-dataview-bytelength.js
vendored
Normal file
24
test/built-ins/TypedArray/prototype/byteLength/return-dataview-bytelength.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.2
|
||||
description: |
|
||||
Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot
|
||||
info: >
|
||||
22.2.3.2 get %TypedArray%.prototype.byteLength
|
||||
|
||||
...
|
||||
6. Let size be the value of O's [[ByteLength]] internal slot.
|
||||
7. Return size.
|
||||
includes: [testTypedArray.js]
|
||||
features: [DataView]
|
||||
---*/
|
||||
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArray.prototype, "byteLength"
|
||||
).get;
|
||||
|
||||
var buffer = new ArrayBuffer(64);
|
||||
var dv = new DataView(buffer, 0);
|
||||
|
||||
assert.sameValue(getter.call(dv), 64);
|
35
test/built-ins/TypedArray/prototype/byteLength/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
35
test/built-ins/TypedArray/prototype/byteLength/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.2
|
||||
description: |
|
||||
Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]]
|
||||
internal slot
|
||||
info: >
|
||||
22.2.3.2 get %TypedArray%.prototype.byteLength
|
||||
|
||||
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 [[ViewedArrayBuffer]] internal slot, throw a TypeError
|
||||
exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "byteLength"
|
||||
).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);
|
||||
});
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.2
|
||||
description: Throws a TypeError exception when `this` is not Object
|
||||
info: >
|
||||
22.2.3.2 get %TypedArray%.prototype.byteLength
|
||||
|
||||
1. Let O be the this value.
|
||||
2. If Type(O) is not Object, throw a TypeError exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "byteLength"
|
||||
).get;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(undefined);
|
||||
}, "this is undefined");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(null);
|
||||
}, "this is null");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(42);
|
||||
}, "this is 42");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call("1");
|
||||
}, "this is a string");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(true);
|
||||
}, "this is true");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(false);
|
||||
}, "this is false");
|
||||
|
||||
var s = Symbol("s");
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(s);
|
||||
}, "this is a Symbol");
|
|
@ -7,11 +7,17 @@ description: >
|
|||
info: >
|
||||
%TypedArray%.prototype.byteOffset is an accessor property whose set accessor
|
||||
function is undefined.
|
||||
includes: [testTypedArray.js]
|
||||
|
||||
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, testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, 'byteOffset');
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, "byteOffset");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, 'function');
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(TypedArrayPrototype, "byteOffset");
|
||||
verifyConfigurable(TypedArrayPrototype, "byteOffset");
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.3
|
||||
description: |
|
||||
Return value from [[ByteOffset]] internal slot
|
||||
info: >
|
||||
22.2.3.3 get %TypedArray%.prototype.byteOffset
|
||||
|
||||
...
|
||||
6. Let offset be the value of O's [[ByteOffset]] internal slot.
|
||||
7. Return size.
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
var ta1 = new TA();
|
||||
assert.sameValue(ta1.byteOffset, 0, "Regular typedArray");
|
||||
|
||||
var offset = 4 * TA.BYTES_PER_ELEMENT;
|
||||
|
||||
var buffer1 = new ArrayBuffer(8 * TA.BYTES_PER_ELEMENT);
|
||||
var ta2 = new TA(buffer1, offset);
|
||||
assert.sameValue(ta2.byteOffset, offset, "TA(buffer, offset)");
|
||||
|
||||
var buffer2 = new ArrayBuffer(8 * TA.BYTES_PER_ELEMENT);
|
||||
var sample = new TA(buffer2, offset)
|
||||
var ta3 = new TA(sample);
|
||||
assert.sameValue(ta3.byteOffset, 0, "TA(typedArray)");
|
||||
});
|
27
test/built-ins/TypedArray/prototype/byteOffset/return-dataview-byteoffset.js
vendored
Normal file
27
test/built-ins/TypedArray/prototype/byteOffset/return-dataview-byteoffset.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.2
|
||||
description: |
|
||||
Return buffer from DataView's instance [[ViewedArrayBuffer]] internal slot
|
||||
info: >
|
||||
22.2.3.2 get %TypedArray%.prototype.byteOffset
|
||||
|
||||
...
|
||||
6. Let offset be the value of O's [[ByteOffset]] internal slot.
|
||||
7. Return size.
|
||||
includes: [testTypedArray.js]
|
||||
features: [DataView]
|
||||
---*/
|
||||
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArray.prototype, "byteOffset"
|
||||
).get;
|
||||
|
||||
var buffer = new ArrayBuffer(64);
|
||||
|
||||
var dv1 = new DataView(buffer, 0);
|
||||
assert.sameValue(getter.call(dv1), 0);
|
||||
|
||||
var dv2 = new DataView(buffer, 32);
|
||||
assert.sameValue(getter.call(dv2), 32);
|
35
test/built-ins/TypedArray/prototype/byteOffset/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
35
test/built-ins/TypedArray/prototype/byteOffset/this-has-no-viewedarraybuffer-internal.js
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.3
|
||||
description: |
|
||||
Throws a TypeError exception when `this` does not have a [[ViewedArrayBuffer]]
|
||||
internal slot
|
||||
info: >
|
||||
22.2.3.3 get %TypedArray%.prototype.byteOffset
|
||||
|
||||
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 [[ViewedArrayBuffer]] internal slot, throw a TypeError
|
||||
exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "byteOffset"
|
||||
).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);
|
||||
});
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.3
|
||||
description: Throws a TypeError exception when `this` is not Object
|
||||
info: >
|
||||
22.2.3.3 get %TypedArray%.prototype.byteOffset
|
||||
|
||||
1. Let O be the this value.
|
||||
2. If Type(O) is not Object, throw a TypeError exception.
|
||||
...
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "byteOffset"
|
||||
).get;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(undefined);
|
||||
}, "this is undefined");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(null);
|
||||
}, "this is null");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(42);
|
||||
}, "this is 42");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call("1");
|
||||
}, "this is a string");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(true);
|
||||
}, "this is true");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(false);
|
||||
}, "this is false");
|
||||
|
||||
var s = Symbol("s");
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(s);
|
||||
}, "this is a Symbol");
|
|
@ -7,11 +7,17 @@ description: >
|
|||
info: >
|
||||
%TypedArray%.prototype.length is an accessor property whose set accessor
|
||||
function is undefined.
|
||||
includes: [testTypedArray.js]
|
||||
|
||||
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, testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, 'length');
|
||||
var desc = Object.getOwnPropertyDescriptor(TypedArrayPrototype, "length");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, 'function');
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(TypedArrayPrototype, "length");
|
||||
verifyConfigurable(TypedArrayPrototype, "length");
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
// 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: |
|
||||
Return value from the [[ArrayLength]] internal slot
|
||||
info: >
|
||||
22.2.3.18 get %TypedArray%.prototype.length
|
||||
|
||||
...
|
||||
6. Let length be the value of O's [[ArrayLength]] internal slot.
|
||||
7. Return length.
|
||||
|
||||
---
|
||||
|
||||
The current tests on `prop-desc.js` and `length.js` already assert `length` is
|
||||
not a dynamic property as in regular arrays.
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
var ta1 = new TA();
|
||||
assert.sameValue(ta1.length, 0);
|
||||
|
||||
var ta2 = new TA(42);
|
||||
assert.sameValue(ta2.length, 42);
|
||||
});
|
41
test/built-ins/TypedArray/prototype/length/this-has-no-typedarrayname-internal.js
vendored
Normal file
41
test/built-ins/TypedArray/prototype/length/this-has-no-typedarrayname-internal.js
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
// 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: [testTypedArray.js]
|
||||
features: [DataView]
|
||||
---*/
|
||||
|
||||
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);
|
||||
});
|
27
test/built-ins/TypedArray/prototype/length/this-is-not-object-strict-mode.js
vendored
Normal file
27
test/built-ins/TypedArray/prototype/length/this-is-not-object-strict-mode.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
// 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 null or undefined
|
||||
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: [testTypedArray.js]
|
||||
flags: [onlyStrict]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "length"
|
||||
).get;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(undefined);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(null);
|
||||
});
|
|
@ -0,0 +1,40 @@
|
|||
// 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: [testTypedArray.js]
|
||||
features: [Symbol]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
var getter = Object.getOwnPropertyDescriptor(
|
||||
TypedArrayPrototype, "length"
|
||||
).get;
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(42);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call("1");
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(true);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(false);
|
||||
});
|
||||
|
||||
var s = Symbol("s");
|
||||
assert.throws(TypeError, function() {
|
||||
getter.call(s);
|
||||
});
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
es6id: 22.2.3.28
|
||||
esid: sec-%typedarray%.prototype.tostring
|
||||
description: >
|
||||
"String" 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, testTypedArray.js]
|
||||
---*/
|
||||
|
||||
var TypedArrayPrototype = TypedArray.prototype;
|
||||
|
||||
verifyNotEnumerable(TypedArrayPrototype, "toString");
|
||||
verifyWritable(TypedArrayPrototype, "toString");
|
||||
verifyConfigurable(TypedArrayPrototype, "toString");
|
|
@ -0,0 +1,13 @@
|
|||
// 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-@@iterator
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property @@iterator
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol.iterator]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty(Symbol.iterator), false);
|
||||
});
|
|
@ -0,0 +1,14 @@
|
|||
// 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-@@tostringtag
|
||||
description: >
|
||||
_TypedArray_.prototype[@@toStringTag] is inherited from %TypedArray%
|
||||
_TypedArray_.prototype has no own property @@toStringTag
|
||||
includes: [testTypedArray.js]
|
||||
features: [Symbol.toStringTag]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty(Symbol.toStringTag), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.buffer
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "buffer"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("buffer"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.bytelength
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "byteLength"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("byteLength"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.byteoffset
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "byteOffset"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("byteOffset"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "copyWithin"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("copyWithin"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.entries
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "entries"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("entries"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "every"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("every"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "fill"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("fill"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "filter"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("filter"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "find"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("find"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "findIndex"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("findIndex"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "forEach"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("forEach"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "indexOf"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("indexOf"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "join"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("join"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "keys"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("keys"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "lastIndexOf"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("lastIndexOf"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "length"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("length"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "map"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("map"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.reduce
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "reduce"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("reduce"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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: >
|
||||
_TypedArray_.prototype has no own property "reduceRight"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("reduceRight"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.reverse
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "reverse"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("reverse"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
esid: sec-%typedarray%.prototype.set
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "set"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("set"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.slice
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "slice"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("slice"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.some
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "some"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("some"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.sort
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "sort"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("sort"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.subarray
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "subarray"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("subarray"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.tolocalestring
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "toLocaleString"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("toLocaleString"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.tostring
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "toString"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("toString"), false);
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
// 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.values
|
||||
description: >
|
||||
_TypedArray_.prototype has no own property "values"
|
||||
includes: [testTypedArray.js]
|
||||
---*/
|
||||
|
||||
testWithTypedArrayConstructors(function(TA) {
|
||||
assert.sameValue(TA.prototype.hasOwnProperty("values"), false);
|
||||
});
|
Loading…
Reference in New Issue