diff --git a/test/built-ins/Promise/all/S25.4.4.1_A1.2_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A1.2_T1.js deleted file mode 100644 index 702df88716..0000000000 --- a/test/built-ins/Promise/all/S25.4.4.1_A1.2_T1.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 Cubane Canada, Inc. All rights reserved. -// See LICENSE for details. - -/*--- -info: Promise.all expects 1 argument -es6id: 25.4.4.1_A1.2_T1 -author: Sam Mikes -description: Promise.all expects 1 argument ----*/ - -// CHECK#1 -if (Promise.all.length !== 1) { - $ERROR('Expected Promise.all to be a function of one argument.'); -} diff --git a/test/built-ins/Promise/all/S25.4.4.1_A1.3_T1.js b/test/built-ins/Promise/all/S25.4.4.1_A1.3_T1.js deleted file mode 100644 index 37c49104b7..0000000000 --- a/test/built-ins/Promise/all/S25.4.4.1_A1.3_T1.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 Jordan Harband. All rights reserved. -// See LICENSE for details. - -/*--- -info: Promise.all is not enumerable -es6id: 25.4.4.1_A1.3_T1 -author: Jordan Harband -description: Promise.all should be non-enumerable -includes: - - propertyHelper.js ----*/ - -// CHECK#1 -verifyNotEnumerable(Promise, 'all'); diff --git a/test/built-ins/Promise/all/length.js b/test/built-ins/Promise/all/length.js new file mode 100644 index 0000000000..37b936c717 --- /dev/null +++ b/test/built-ins/Promise/all/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.1 +description: Promise.all `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.all.length, 1); + +verifyNotEnumerable(Promise.all, 'length'); +verifyNotWritable(Promise.all, 'length'); +verifyConfigurable(Promise.all, 'length'); diff --git a/test/built-ins/Promise/all/name.js b/test/built-ins/Promise/all/name.js new file mode 100644 index 0000000000..42c80de04a --- /dev/null +++ b/test/built-ins/Promise/all/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.1 +description: Promise.all `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.all.name, 'all'); + +verifyNotEnumerable(Promise.all, 'name'); +verifyNotWritable(Promise.all, 'name'); +verifyConfigurable(Promise.all, 'name'); diff --git a/test/built-ins/Promise/all/prop-desc.js b/test/built-ins/Promise/all/prop-desc.js new file mode 100644 index 0000000000..59f6c0d83e --- /dev/null +++ b/test/built-ins/Promise/all/prop-desc.js @@ -0,0 +1,19 @@ +// Copyright 2015 Jordan Harband. All rights reserved. +// See LICENSE for details. + +/*--- +es6id: 25.4.4.1_A1.3_T1 +author: Jordan Harband +description: Promise.all property descriptor +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] +---*/ + +verifyNotEnumerable(Promise, 'all'); +verifyWritable(Promise, 'all'); +verifyConfigurable(Promise, 'all'); diff --git a/test/built-ins/Promise/length.js b/test/built-ins/Promise/length.js new file mode 100644 index 0000000000..f7fa46c5af --- /dev/null +++ b/test/built-ins/Promise/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.3.1 +description: Promise `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.length, 1); + +verifyNotEnumerable(Promise, 'length'); +verifyNotWritable(Promise, 'length'); +verifyConfigurable(Promise, 'length'); diff --git a/test/built-ins/Promise/name.js b/test/built-ins/Promise/name.js new file mode 100644 index 0000000000..b9740d1cef --- /dev/null +++ b/test/built-ins/Promise/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.3.1 +description: Promise `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.name, 'Promise'); + +verifyNotEnumerable(Promise, 'name'); +verifyNotWritable(Promise, 'name'); +verifyConfigurable(Promise, 'name'); diff --git a/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js b/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js index 4b9cbac28f..04fdf667b7 100644 --- a/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js +++ b/test/built-ins/Promise/prototype/S25.4.4.2_A1.1_T1.js @@ -13,8 +13,3 @@ description: Promise prototype exists if (Promise.prototype === undefined) { $ERROR("Expected Promise.prototype to be defined."); } - -if (!(Promise.prototype instanceof Object)) { - $ERROR("Expected Promise.prototype to be an object."); -} - diff --git a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js index fe2a7446b1..9ea1e7ddd6 100644 --- a/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js +++ b/test/built-ins/Promise/prototype/catch/S25.4.5.1_A2.1_T1.js @@ -14,9 +14,3 @@ var p = Promise.resolve(3); if (!(p.catch instanceof Function)) { $ERROR("Expected p.catch to be a function"); } - -if (p.catch.length !== 1) { - $ERROR("Expected p.catch to take one argument"); -} - - diff --git a/test/built-ins/Promise/prototype/catch/length.js b/test/built-ins/Promise/prototype/catch/length.js new file mode 100644 index 0000000000..8cf5412b3b --- /dev/null +++ b/test/built-ins/Promise/prototype/catch/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.1 +description: Promise.prototype.catch `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.prototype.catch.length, 1); + +verifyNotEnumerable(Promise.prototype.catch, 'length'); +verifyNotWritable(Promise.prototype.catch, 'length'); +verifyConfigurable(Promise.prototype.catch, 'length'); diff --git a/test/built-ins/Promise/prototype/catch/name.js b/test/built-ins/Promise/prototype/catch/name.js new file mode 100644 index 0000000000..920e2a4d90 --- /dev/null +++ b/test/built-ins/Promise/prototype/catch/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.1 +description: Promise.prototype.catch `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.prototype.catch.name, 'catch'); + +verifyNotEnumerable(Promise.prototype.catch, 'name'); +verifyNotWritable(Promise.prototype.catch, 'name'); +verifyConfigurable(Promise.prototype.catch, 'name'); diff --git a/test/built-ins/Promise/prototype/catch/prop-desc.js b/test/built-ins/Promise/prototype/catch/prop-desc.js new file mode 100644 index 0000000000..3d559a4db9 --- /dev/null +++ b/test/built-ins/Promise/prototype/catch/prop-desc.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.1 +description: Promise.prototype.catch property descriptor +info: > + 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] +---*/ + +assert.sameValue(typeof Promise.prototype.catch, 'function'); + +verifyNotEnumerable(Promise.prototype, 'catch'); +verifyWritable(Promise.prototype, 'catch'); +verifyConfigurable(Promise.prototype, 'catch'); diff --git a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js index 10ac0554d9..b3dc383a05 100644 --- a/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js +++ b/test/built-ins/Promise/prototype/then/S25.4.5.3_A1.1_T1.js @@ -12,7 +12,3 @@ description: Promise.prototype.then is a function of two arguments if (!(Promise.prototype.then instanceof Function)) { $ERROR("Expected Promise.prototype.then to be a function"); } - -if (Promise.prototype.then.length !== 2) { - $ERROR("Expected Promise.prototype.then to be a function of two arguments"); -} diff --git a/test/built-ins/Promise/prototype/then/length.js b/test/built-ins/Promise/prototype/then/length.js new file mode 100644 index 0000000000..43ba86d29a --- /dev/null +++ b/test/built-ins/Promise/prototype/then/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.3 +description: Promise.prototype.then `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.prototype.then.length, 2); + +verifyNotEnumerable(Promise.prototype.then, 'length'); +verifyNotWritable(Promise.prototype.then, 'length'); +verifyConfigurable(Promise.prototype.then, 'length'); diff --git a/test/built-ins/Promise/prototype/then/name.js b/test/built-ins/Promise/prototype/then/name.js new file mode 100644 index 0000000000..159e2f9b49 --- /dev/null +++ b/test/built-ins/Promise/prototype/then/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.3 +description: Promise.prototype.then `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.prototype.then.name, 'then'); + +verifyNotEnumerable(Promise.prototype.then, 'name'); +verifyNotWritable(Promise.prototype.then, 'name'); +verifyConfigurable(Promise.prototype.then, 'name'); diff --git a/test/built-ins/Promise/prototype/then/prop-desc.js b/test/built-ins/Promise/prototype/then/prop-desc.js new file mode 100644 index 0000000000..002a8e9821 --- /dev/null +++ b/test/built-ins/Promise/prototype/then/prop-desc.js @@ -0,0 +1,17 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.5.1 +description: Promise.prototype.then property descriptor +info: > + 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] +---*/ + +assert.sameValue(typeof Promise.prototype.then, 'function'); + +verifyNotEnumerable(Promise.prototype, 'then'); +verifyWritable(Promise.prototype, 'then'); +verifyConfigurable(Promise.prototype, 'then'); diff --git a/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js index 0afc99700d..b924406696 100644 --- a/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js +++ b/test/built-ins/Promise/race/S25.4.4.3_A1.1_T1.js @@ -11,7 +11,3 @@ description: Promise.race is callable if (typeof Promise.race !== "function") { $ERROR("Expected Promise.race to be a function, actually " + typeof Promise.race); } - -if (Promise.race.length !== 1) { - $ERROR("Expected Promise.race to be a function of 1 argument."); -} diff --git a/test/built-ins/Promise/race/S25.4.4.3_A1.2_T1.js b/test/built-ins/Promise/race/S25.4.4.3_A1.2_T1.js deleted file mode 100644 index 465e224082..0000000000 --- a/test/built-ins/Promise/race/S25.4.4.3_A1.2_T1.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 Jordan Harband. All rights reserved. -// See LICENSE for details. - -/*--- -info: Promise.race is not enumerable -es6id: 25.4.4.3_A1.2_T1 -author: Jordan Harband -description: Promise.race should be non-enumerable -includes: - - propertyHelper.js ----*/ - -// CHECK#1 -verifyNotEnumerable(Promise, 'race'); diff --git a/test/built-ins/Promise/race/length.js b/test/built-ins/Promise/race/length.js new file mode 100644 index 0000000000..5d15293585 --- /dev/null +++ b/test/built-ins/Promise/race/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.3 +description: Promise.race `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.race.length, 1); + +verifyNotEnumerable(Promise.race, 'length'); +verifyNotWritable(Promise.race, 'length'); +verifyConfigurable(Promise.race, 'length'); diff --git a/test/built-ins/Promise/race/name.js b/test/built-ins/Promise/race/name.js new file mode 100644 index 0000000000..11f52612bb --- /dev/null +++ b/test/built-ins/Promise/race/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.3 +description: Promise.race `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.race.name, 'race'); + +verifyNotEnumerable(Promise.race, 'name'); +verifyNotWritable(Promise.race, 'name'); +verifyConfigurable(Promise.race, 'name'); diff --git a/test/built-ins/Promise/race/prop-desc.js b/test/built-ins/Promise/race/prop-desc.js new file mode 100644 index 0000000000..1090fba61c --- /dev/null +++ b/test/built-ins/Promise/race/prop-desc.js @@ -0,0 +1,19 @@ +// Copyright 2015 Jordan Harband. All rights reserved. +// See LICENSE for details. + +/*--- +es6id: 25.4.4.3_A1.2_T1 +author: Jordan Harband +description: Promise.race property descriptor +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] +---*/ + +verifyNotEnumerable(Promise, 'race'); +verifyWritable(Promise, 'race'); +verifyConfigurable(Promise, 'race'); diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js index 639cd9fd0d..bdef2fce94 100644 --- a/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js +++ b/test/built-ins/Promise/reject/S25.4.4.4_A1.1_T1.js @@ -12,7 +12,3 @@ description: Promise.reject is a function if ((typeof Promise.reject) !== "function") { $ERROR("Expected Promise.reject to be a function"); } - -if (Promise.reject.length !== 1) { - $ERROR("Expected Promise.reject to be a function of one argument"); -} diff --git a/test/built-ins/Promise/reject/S25.4.4.4_A1.2_T1.js b/test/built-ins/Promise/reject/S25.4.4.4_A1.2_T1.js deleted file mode 100644 index f0545bd4e2..0000000000 --- a/test/built-ins/Promise/reject/S25.4.4.4_A1.2_T1.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 Jordan Harband. All rights reserved. -// See LICENSE for details. - -/*--- -info: Promise.reject is not enumerable -es6id: 25.4.4.4_A1.2_T1 -author: Jordan Harband -description: Promise.reject should be non-enumerable -includes: - - propertyHelper.js ----*/ - -// CHECK#1 -verifyNotEnumerable(Promise, 'reject'); diff --git a/test/built-ins/Promise/reject/length.js b/test/built-ins/Promise/reject/length.js new file mode 100644 index 0000000000..15c44f91e6 --- /dev/null +++ b/test/built-ins/Promise/reject/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.4 +description: Promise.reject `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.reject.length, 1); + +verifyNotEnumerable(Promise.reject, 'length'); +verifyNotWritable(Promise.reject, 'length'); +verifyConfigurable(Promise.reject, 'length'); diff --git a/test/built-ins/Promise/reject/name.js b/test/built-ins/Promise/reject/name.js new file mode 100644 index 0000000000..105125dad6 --- /dev/null +++ b/test/built-ins/Promise/reject/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.4 +description: Promise.reject `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.reject.name, 'reject'); + +verifyNotEnumerable(Promise.reject, 'name'); +verifyNotWritable(Promise.reject, 'name'); +verifyConfigurable(Promise.reject, 'name'); diff --git a/test/built-ins/Promise/reject/prop-desc.js b/test/built-ins/Promise/reject/prop-desc.js new file mode 100644 index 0000000000..c912a5ccf4 --- /dev/null +++ b/test/built-ins/Promise/reject/prop-desc.js @@ -0,0 +1,19 @@ +// Copyright 2015 Jordan Harband. All rights reserved. +// See LICENSE for details. + +/*--- +es6id: 25.4.4.4_A1.2_T1 +author: Jordan Harband +description: Promise.reject property descriptor +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] +---*/ + +verifyNotEnumerable(Promise, 'reject'); +verifyWritable(Promise, 'reject'); +verifyConfigurable(Promise, 'reject'); diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js index 6c92a08f24..c35b2bcceb 100644 --- a/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js +++ b/test/built-ins/Promise/resolve/S25.4.4.5_A1.1_T1.js @@ -12,7 +12,3 @@ description: Promise.resolve is a function if ((typeof Promise.resolve) !== "function") { $ERROR("Expected Promise.resolve to be a function"); } - -if (Promise.resolve.length !== 1) { - $ERROR("Expected Promise.resolve to be a function of one argument"); -} diff --git a/test/built-ins/Promise/resolve/S25.4.4.5_A1.2_T1.js b/test/built-ins/Promise/resolve/S25.4.4.5_A1.2_T1.js deleted file mode 100644 index 43c5045e0c..0000000000 --- a/test/built-ins/Promise/resolve/S25.4.4.5_A1.2_T1.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2015 Jordan Harband. All rights reserved. -// See LICENSE for details. - -/*--- -info: Promise.resolve is not enumerable -es6id: 25.4.4.5_A1.2_T1 -author: Jordan Harband -description: Promise.resolve should be non-enumerable -includes: - - propertyHelper.js ----*/ - -// CHECK#1 -verifyNotEnumerable(Promise, 'resolve'); diff --git a/test/built-ins/Promise/resolve/length.js b/test/built-ins/Promise/resolve/length.js new file mode 100644 index 0000000000..2cce77bc8b --- /dev/null +++ b/test/built-ins/Promise/resolve/length.js @@ -0,0 +1,25 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.5 +description: Promise.resolve `length` property +info: > + ES6 Section 17: + 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. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Promise.resolve.length, 1); + +verifyNotEnumerable(Promise.resolve, 'length'); +verifyNotWritable(Promise.resolve, 'length'); +verifyConfigurable(Promise.resolve, 'length'); diff --git a/test/built-ins/Promise/resolve/name.js b/test/built-ins/Promise/resolve/name.js new file mode 100644 index 0000000000..7d061693b2 --- /dev/null +++ b/test/built-ins/Promise/resolve/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 25.4.4.5 +description: Promise.resolve `name` property +info: > + ES6 Section 17: + + 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, this value is the name that is given to + the function in this specification. + + [...] + + 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] +---*/ + +assert.sameValue(Promise.resolve.name, 'resolve'); + +verifyNotEnumerable(Promise.resolve, 'name'); +verifyNotWritable(Promise.resolve, 'name'); +verifyConfigurable(Promise.resolve, 'name'); diff --git a/test/built-ins/Promise/resolve/prop-desc.js b/test/built-ins/Promise/resolve/prop-desc.js new file mode 100644 index 0000000000..c41c3e9dbc --- /dev/null +++ b/test/built-ins/Promise/resolve/prop-desc.js @@ -0,0 +1,19 @@ +// Copyright 2015 Jordan Harband. All rights reserved. +// See LICENSE for details. + +/*--- +es6id: 25.4.4.5_A1.2_T1 +author: Jordan Harband +description: Promise.resolve should be non-enumerable +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] +---*/ + +verifyNotEnumerable(Promise, 'resolve'); +verifyWritable(Promise, 'resolve'); +verifyConfigurable(Promise, 'resolve');