diff --git a/test/built-ins/Promise/all/resolve-element-function-extensible.js b/test/built-ins/Promise/all/resolve-element-function-extensible.js new file mode 100755 index 0000000000..ec58bfb728 --- /dev/null +++ b/test/built-ins/Promise/all/resolve-element-function-extensible.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.4.1.2 +description: The [[Extensible]] slot of Promise.all Resolve Element functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless specified otherwise, the [[Extensible]] internal slot + of a built-in object initially has the value true. +---*/ + +var resolveElementFunction; +var thenable = { + then: function(fulfill) { + resolveElementFunction = fulfill; + } +}; +function NotPromise(executor) { + executor(function(){}, function(){}); +} +NotPromise.resolve = function(v) { return v; }; +Promise.all.call(NotPromise, [thenable]); + +assert(Object.isExtensible(resolveElementFunction)); diff --git a/test/built-ins/Promise/all/resolve-element-function-length.js b/test/built-ins/Promise/all/resolve-element-function-length.js new file mode 100755 index 0000000000..4be074f61b --- /dev/null +++ b/test/built-ins/Promise/all/resolve-element-function-length.js @@ -0,0 +1,33 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.4.1.2 +description: The `length` property of Promise.all Resolve Element functions +info: > + The length property of a Promise.all resolve element function is 1. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var resolveElementFunction; +var thenable = { + then: function(fulfill) { + resolveElementFunction = fulfill; + } +}; +function NotPromise(executor) { + executor(function(){}, function(){}); +} +NotPromise.resolve = function(v) { return v; }; +Promise.all.call(NotPromise, [thenable]); + +assert.sameValue(resolveElementFunction.length, 1); + +verifyNotEnumerable(resolveElementFunction, "length"); +verifyNotWritable(resolveElementFunction, "length"); +verifyConfigurable(resolveElementFunction, "length"); diff --git a/test/built-ins/Promise/all/resolve-element-function-name.js b/test/built-ins/Promise/all/resolve-element-function-name.js new file mode 100755 index 0000000000..9276f1aa11 --- /dev/null +++ b/test/built-ins/Promise/all/resolve-element-function-name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.4.1.2 +description: The `name` property of Promise.all Resolve Element functions +info: > + A promise resolve function is an anonymous built-in function. + + 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. +---*/ + +var resolveElementFunction; +var thenable = { + then: function(fulfill) { + resolveElementFunction = fulfill; + } +}; +function NotPromise(executor) { + executor(function(){}, function(){}); +} +NotPromise.resolve = function(v) { return v; }; +Promise.all.call(NotPromise, [thenable]); + +assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "name"), false); diff --git a/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js new file mode 100755 index 0000000000..13087c6ca9 --- /dev/null +++ b/test/built-ins/Promise/all/resolve-element-function-nonconstructor.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.4.1.2 +description: Promise.all Resolve Element functions are not constructors +info: > + 17 ECMAScript Standard Built-in Objects: + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified + in the description of a particular function. +---*/ + +var resolveElementFunction; +var thenable = { + then: function(fulfill) { + resolveElementFunction = fulfill; + } +}; +function NotPromise(executor) { + executor(function(){}, function(){}); +} +NotPromise.resolve = function(v) { return v; }; +Promise.all.call(NotPromise, [thenable]); + +assert.sameValue(Object.prototype.hasOwnProperty.call(resolveElementFunction, "prototype"), false); +assert.throws(TypeError, function() { new resolveElementFunction(); }); diff --git a/test/built-ins/Promise/all/resolve-element-function-prototype.js b/test/built-ins/Promise/all/resolve-element-function-prototype.js new file mode 100755 index 0000000000..49c69c8f02 --- /dev/null +++ b/test/built-ins/Promise/all/resolve-element-function-prototype.js @@ -0,0 +1,27 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.4.1.2 +description: The [[Prototype]] of Promise.all Resolve Element functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified every built-in function and every built-in + constructor has the Function prototype object, which is the initial + value of the expression Function.prototype (19.2.3), as the value of + its [[Prototype]] internal slot. +---*/ + +var resolveElementFunction; +var thenable = { + then: function(fulfill) { + resolveElementFunction = fulfill; + } +}; +function NotPromise(executor) { + executor(function(){}, function(){}); +} +NotPromise.resolve = function(v) { return v; }; +Promise.all.call(NotPromise, [thenable]); + +assert.sameValue(Object.getPrototypeOf(resolveElementFunction), Function.prototype); diff --git a/test/built-ins/Promise/executor-function-extensible.js b/test/built-ins/Promise/executor-function-extensible.js new file mode 100755 index 0000000000..10806cb72e --- /dev/null +++ b/test/built-ins/Promise/executor-function-extensible.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.5.1 +description: The [[Extensible]] slot of GetCapabilitiesExecutor functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless specified otherwise, the [[Extensible]] internal slot + of a built-in object initially has the value true. +---*/ + +var executorFunction; +function NotPromise(executor) { + executorFunction = executor; + executor(() => {}, () => {}); +} +Promise.resolve.call(NotPromise); + +assert(Object.isExtensible(executorFunction)); diff --git a/test/built-ins/Promise/executor-function-length.js b/test/built-ins/Promise/executor-function-length.js new file mode 100755 index 0000000000..775e7f4137 --- /dev/null +++ b/test/built-ins/Promise/executor-function-length.js @@ -0,0 +1,28 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.5.1 +description: The `length` property of GetCapabilitiesExecutor functions +info: > + The length property of a GetCapabilitiesExecutor function is 2. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var executorFunction; +function NotPromise(executor) { + executorFunction = executor; + executor(() => {}, () => {}); +} +Promise.resolve.call(NotPromise); + +assert.sameValue(executorFunction.length, 2); + +verifyNotEnumerable(executorFunction, "length"); +verifyNotWritable(executorFunction, "length"); +verifyConfigurable(executorFunction, "length"); diff --git a/test/built-ins/Promise/executor-function-name.js b/test/built-ins/Promise/executor-function-name.js new file mode 100755 index 0000000000..4fd37eee39 --- /dev/null +++ b/test/built-ins/Promise/executor-function-name.js @@ -0,0 +1,23 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.5.1 +description: The `name` property of GetCapabilitiesExecutor functions +info: > + A GetCapabilitiesExecutor function is an anonymous built-in function. + + 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. +---*/ + +var executorFunction; +function NotPromise(executor) { + executorFunction = executor; + executor(() => {}, () => {}); +} +Promise.resolve.call(NotPromise); + +assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "name"), false); diff --git a/test/built-ins/Promise/executor-function-nonconstructor.js b/test/built-ins/Promise/executor-function-nonconstructor.js new file mode 100755 index 0000000000..b15d49d813 --- /dev/null +++ b/test/built-ins/Promise/executor-function-nonconstructor.js @@ -0,0 +1,22 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.5.1 +description: GetCapabilitiesExecutor functions are not constructors +info: > + 17 ECMAScript Standard Built-in Objects: + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified + in the description of a particular function. +---*/ + +var executorFunction; +function NotPromise(executor) { + executorFunction = executor; + executor(() => {}, () => {}); +} +Promise.resolve.call(NotPromise); + +assert.sameValue(Object.prototype.hasOwnProperty.call(executorFunction, "prototype"), false); +assert.throws(TypeError, function() { new executorFunction(); }); diff --git a/test/built-ins/Promise/executor-function-prototype.js b/test/built-ins/Promise/executor-function-prototype.js new file mode 100755 index 0000000000..46af405094 --- /dev/null +++ b/test/built-ins/Promise/executor-function-prototype.js @@ -0,0 +1,22 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.5.1 +description: The [[Prototype]] of GetCapabilitiesExecutor functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified every built-in function and every built-in + constructor has the Function prototype object, which is the initial + value of the expression Function.prototype (19.2.3), as the value of + its [[Prototype]] internal slot. +---*/ + +var executorFunction; +function NotPromise(executor) { + executorFunction = executor; + executor(() => {}, () => {}); +} +Promise.resolve.call(NotPromise); + +assert.sameValue(Object.getPrototypeOf(executorFunction), Function.prototype); diff --git a/test/built-ins/Promise/reject-function-extensible.js b/test/built-ins/Promise/reject-function-extensible.js new file mode 100755 index 0000000000..e04b6f0f62 --- /dev/null +++ b/test/built-ins/Promise/reject-function-extensible.js @@ -0,0 +1,18 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.1 +description: The [[Extensible]] slot of Promise Reject functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless specified otherwise, the [[Extensible]] internal slot + of a built-in object initially has the value true. +---*/ + +var rejectFunction; +new Promise(function(resolve, reject) { + rejectFunction = reject; +}); + +assert(Object.isExtensible(rejectFunction)); diff --git a/test/built-ins/Promise/reject-function-length.js b/test/built-ins/Promise/reject-function-length.js new file mode 100755 index 0000000000..573b34724a --- /dev/null +++ b/test/built-ins/Promise/reject-function-length.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.1 +description: The `length` property of Promise Reject functions +info: > + The length property of a promise reject function is 1. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var rejectFunction; +new Promise(function(resolve, reject) { + rejectFunction = reject; +}); + +assert.sameValue(rejectFunction.length, 1); + +verifyNotEnumerable(rejectFunction, "length"); +verifyNotWritable(rejectFunction, "length"); +verifyConfigurable(rejectFunction, "length"); diff --git a/test/built-ins/Promise/reject-function-name.js b/test/built-ins/Promise/reject-function-name.js new file mode 100755 index 0000000000..dd60b1172d --- /dev/null +++ b/test/built-ins/Promise/reject-function-name.js @@ -0,0 +1,21 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.1 +description: The `name` property of Promise Reject functions +info: > + A promise reject function is an anonymous built-in function. + + 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. +---*/ + +var rejectFunction; +new Promise(function(resolve, reject) { + rejectFunction = reject; +}); + +assert.sameValue(Object.prototype.hasOwnProperty.call(rejectFunction, "name"), false); diff --git a/test/built-ins/Promise/reject-function-nonconstructor.js b/test/built-ins/Promise/reject-function-nonconstructor.js new file mode 100755 index 0000000000..e4db482727 --- /dev/null +++ b/test/built-ins/Promise/reject-function-nonconstructor.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.1 +description: Promise Reject functions are not constructors +info: > + 17 ECMAScript Standard Built-in Objects: + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified + in the description of a particular function. +---*/ + +var rejectFunction; +new Promise(function(resolve, reject) { + rejectFunction = reject; +}); + +assert.sameValue(Object.prototype.hasOwnProperty.call(rejectFunction, "prototype"), false); +assert.throws(TypeError, function() { new rejectFunction(); }); diff --git a/test/built-ins/Promise/reject-function-prototype.js b/test/built-ins/Promise/reject-function-prototype.js new file mode 100755 index 0000000000..14963c4e03 --- /dev/null +++ b/test/built-ins/Promise/reject-function-prototype.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.1 +description: The [[Prototype]] of Promise Reject functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified every built-in function and every built-in + constructor has the Function prototype object, which is the initial + value of the expression Function.prototype (19.2.3), as the value of + its [[Prototype]] internal slot. +---*/ + +var rejectFunction; +new Promise(function(resolve, reject) { + rejectFunction = reject; +}); + +assert.sameValue(Object.getPrototypeOf(rejectFunction), Function.prototype); diff --git a/test/built-ins/Promise/resolve-function-extensible.js b/test/built-ins/Promise/resolve-function-extensible.js new file mode 100755 index 0000000000..d4048dd834 --- /dev/null +++ b/test/built-ins/Promise/resolve-function-extensible.js @@ -0,0 +1,18 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.2 +description: The [[Extensible]] slot of Promise Resolve functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless specified otherwise, the [[Extensible]] internal slot + of a built-in object initially has the value true. +---*/ + +var resolveFunction; +new Promise(function(resolve, reject) { + resolveFunction = resolve; +}); + +assert(Object.isExtensible(resolveFunction)); diff --git a/test/built-ins/Promise/resolve-function-length.js b/test/built-ins/Promise/resolve-function-length.js new file mode 100755 index 0000000000..e7dd99c06e --- /dev/null +++ b/test/built-ins/Promise/resolve-function-length.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.2 +description: The `length` property of Promise Resolve functions +info: > + The length property of a promise resolve function is 1. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var resolveFunction; +new Promise(function(resolve, reject) { + resolveFunction = resolve; +}); + +assert.sameValue(resolveFunction.length, 1); + +verifyNotEnumerable(resolveFunction, "length"); +verifyNotWritable(resolveFunction, "length"); +verifyConfigurable(resolveFunction, "length"); diff --git a/test/built-ins/Promise/resolve-function-name.js b/test/built-ins/Promise/resolve-function-name.js new file mode 100755 index 0000000000..1782f31485 --- /dev/null +++ b/test/built-ins/Promise/resolve-function-name.js @@ -0,0 +1,21 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.2 +description: The `name` property of Promise Resolve functions +info: > + A promise resolve function is an anonymous built-in function. + + 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. +---*/ + +var resolveFunction; +new Promise(function(resolve, reject) { + resolveFunction = resolve; +}); + +assert.sameValue(Object.prototype.hasOwnProperty.call(resolveFunction, "name"), false); diff --git a/test/built-ins/Promise/resolve-function-nonconstructor.js b/test/built-ins/Promise/resolve-function-nonconstructor.js new file mode 100755 index 0000000000..f5a3079cbd --- /dev/null +++ b/test/built-ins/Promise/resolve-function-nonconstructor.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.2 +description: Promise Resolve functions are not constructors +info: > + 17 ECMAScript Standard Built-in Objects: + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified + in the description of a particular function. +---*/ + +var resolveFunction; +new Promise(function(resolve, reject) { + resolveFunction = resolve; +}); + +assert.sameValue(Object.prototype.hasOwnProperty.call(resolveFunction, "prototype"), false); +assert.throws(TypeError, function() { new resolveFunction(); }); diff --git a/test/built-ins/Promise/resolve-function-prototype.js b/test/built-ins/Promise/resolve-function-prototype.js new file mode 100755 index 0000000000..25021d12d3 --- /dev/null +++ b/test/built-ins/Promise/resolve-function-prototype.js @@ -0,0 +1,20 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 25.4.1.3.2 +description: The [[Prototype]] of Promise Resolve functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified every built-in function and every built-in + constructor has the Function prototype object, which is the initial + value of the expression Function.prototype (19.2.3), as the value of + its [[Prototype]] internal slot. +---*/ + +var resolveFunction; +new Promise(function(resolve, reject) { + resolveFunction = resolve; +}); + +assert.sameValue(Object.getPrototypeOf(resolveFunction), Function.prototype); diff --git a/test/built-ins/Proxy/revocable/revocation-function-extensible.js b/test/built-ins/Proxy/revocable/revocation-function-extensible.js new file mode 100755 index 0000000000..299889e355 --- /dev/null +++ b/test/built-ins/Proxy/revocable/revocation-function-extensible.js @@ -0,0 +1,15 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 26.2.2.1.1 +description: The [[Extensible]] slot of Proxy Revocation functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless specified otherwise, the [[Extensible]] internal slot + of a built-in object initially has the value true. +---*/ + +var revocationFunction = Proxy.revocable({}, {}).revoke; + +assert(Object.isExtensible(revocationFunction)); diff --git a/test/built-ins/Proxy/revocable/revocation-function-length.js b/test/built-ins/Proxy/revocable/revocation-function-length.js new file mode 100755 index 0000000000..e12183cc8c --- /dev/null +++ b/test/built-ins/Proxy/revocable/revocation-function-length.js @@ -0,0 +1,23 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 26.2.2.1.1 +description: The `length` property of Proxy Revocation functions +info: > + The length property of a Proxy revocation function is 0. + + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var revocationFunction = Proxy.revocable({}, {}).revoke; + +assert.sameValue(revocationFunction.length, 0); + +verifyNotEnumerable(revocationFunction, "length"); +verifyNotWritable(revocationFunction, "length"); +verifyConfigurable(revocationFunction, "length"); diff --git a/test/built-ins/Proxy/revocable/revocation-function-name.js b/test/built-ins/Proxy/revocable/revocation-function-name.js new file mode 100755 index 0000000000..605d31ec1c --- /dev/null +++ b/test/built-ins/Proxy/revocable/revocation-function-name.js @@ -0,0 +1,18 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 26.2.2.1.1 +description: The `name` property of Proxy Revocation functions +info: > + A Proxy revocation function is an anonymous function. + + 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. +---*/ + +var revocationFunction = Proxy.revocable({}, {}).revoke; + +assert.sameValue(Object.prototype.hasOwnProperty.call(revocationFunction, "name"), false); diff --git a/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js b/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js new file mode 100755 index 0000000000..80201e2ad7 --- /dev/null +++ b/test/built-ins/Proxy/revocable/revocation-function-nonconstructor.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 26.2.2.1.1 +description: Proxy Revocation functions are not constructors +info: > + 17 ECMAScript Standard Built-in Objects: + Built-in function objects that are not identified as constructors do not + implement the [[Construct]] internal method unless otherwise specified + in the description of a particular function. +---*/ + +var revocationFunction = Proxy.revocable({}, {}).revoke; + +assert.sameValue(Object.prototype.hasOwnProperty.call(revocationFunction, "prototype"), false); +assert.throws(TypeError, function() { new revocationFunction(); }); diff --git a/test/built-ins/Proxy/revocable/revocation-function-prototype.js b/test/built-ins/Proxy/revocable/revocation-function-prototype.js new file mode 100755 index 0000000000..cfb5c87f14 --- /dev/null +++ b/test/built-ins/Proxy/revocable/revocation-function-prototype.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 26.2.2.1.1 +description: The [[Prototype]] of Proxy Revocation functions +info: > + 17 ECMAScript Standard Built-in Objects: + Unless otherwise specified every built-in function and every built-in + constructor has the Function prototype object, which is the initial + value of the expression Function.prototype (19.2.3), as the value of + its [[Prototype]] internal slot. +---*/ + +var revocationFunction = Proxy.revocable({}, {}).revoke; + +assert.sameValue(Object.getPrototypeOf(revocationFunction), Function.prototype);