mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 23:14:47 +02:00
use proper isConstructor check for recently added ArrayBuffer/SharedArrayBuffer tests
This commit is contained in:
parent
9efb4f8e53
commit
eb613f6891
@ -11,13 +11,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
features: [resizable-arraybuffer]
|
includes: [isConstructor.js]
|
||||||
|
features: [resizable-arraybuffer, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert(!isConstructor(ArrayBuffer.prototype.resize), "ArrayBuffer.prototype.resize is not a constructor");
|
||||||
Object.prototype.hasOwnProperty.call(ArrayBuffer.prototype.resize, 'prototype'),
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
var arrayBuffer = new ArrayBuffer(8);
|
var arrayBuffer = new ArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
@ -12,9 +12,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
|
includes: [isConstructor.js]
|
||||||
|
features: [Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(ArrayBuffer.prototype.slice, "prototype"), false);
|
assert(!isConstructor(ArrayBuffer.prototype.slice), "ArrayBuffer.prototype.slice is not a constructor");
|
||||||
|
|
||||||
var arrayBuffer = new ArrayBuffer(8);
|
var arrayBuffer = new ArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
@ -11,13 +11,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
features: [arraybuffer-transfer]
|
includes: [isConstructor.js]
|
||||||
|
features: [arraybuffer-transfer, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert(!isConstructor(ArrayBuffer.prototype.transfer), "ArrayBuffer.prototype.transfer is not a constructor");
|
||||||
Object.prototype.hasOwnProperty.call(ArrayBuffer.prototype.transfer, 'prototype'),
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
var arrayBuffer = new ArrayBuffer(8);
|
var arrayBuffer = new ArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
@ -11,13 +11,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
features: [arraybuffer-transfer]
|
includes: [isConstructor.js]
|
||||||
|
features: [arraybuffer-transfer, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert(!isConstructor(ArrayBuffer.prototype.transferToFixedLength), "ArrayBuffer.prototype.transferToFixedLength is not a constructor");
|
||||||
Object.prototype.hasOwnProperty.call(ArrayBuffer.prototype.transferToFixedLength, 'prototype'),
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
var arrayBuffer = new ArrayBuffer(8);
|
var arrayBuffer = new ArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
@ -11,13 +11,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
features: [SharedArrayBuffer, resizable-arraybuffer]
|
includes: [isConstructor.js]
|
||||||
|
features: [SharedArrayBuffer, resizable-arraybuffer, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(
|
assert(!isConstructor(SharedArrayBuffer.prototype.grow), "SharedArrayBuffer.prototype.grow is not a constructor");
|
||||||
Object.prototype.hasOwnProperty.call(SharedArrayBuffer.prototype.grow, 'prototype'),
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
var arrayBuffer = new SharedArrayBuffer(8);
|
var arrayBuffer = new SharedArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
@ -12,10 +12,11 @@ info: |
|
|||||||
Built-in function objects that are not identified as constructors do not
|
Built-in function objects that are not identified as constructors do not
|
||||||
implement the [[Construct]] internal method unless otherwise specified
|
implement the [[Construct]] internal method unless otherwise specified
|
||||||
in the description of a particular function.
|
in the description of a particular function.
|
||||||
features: [SharedArrayBuffer]
|
includes: [isConstructor.js]
|
||||||
|
features: [SharedArrayBuffer, Reflect.construct]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
assert.sameValue(Object.prototype.hasOwnProperty.call(SharedArrayBuffer.prototype.slice, "prototype"), false);
|
assert(!isConstructor(SharedArrayBuffer.prototype.slice), "SharedArrayBuffer.prototype.slice is not a constructor");
|
||||||
|
|
||||||
var arrayBuffer = new SharedArrayBuffer(8);
|
var arrayBuffer = new SharedArrayBuffer(8);
|
||||||
assert.throws(TypeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user