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 702df887168b127acd9c016560fba25930c94b14..0000000000000000000000000000000000000000 --- 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 37c49104b7aa7e3762cef5e82da3e0d9565f071e..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..37b936c717961dde12f7369503902c60adb3fd3d --- /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 0000000000000000000000000000000000000000..42c80de04ae15e7629914a59bd6e2ee52276573c --- /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 0000000000000000000000000000000000000000..59f6c0d83e6362f87664c75354162e7423010a5a --- /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 0000000000000000000000000000000000000000..f7fa46c5af11586c796f2cf7383c7397e11ed676 --- /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 0000000000000000000000000000000000000000..b9740d1cef71bec646489b10e90c1eabec42fa1f --- /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 4b9cbac28fd0216e3343e03e73278dc9be07dca1..04fdf667b720b40aef8e9b0ecf9a69be535d73b5 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 fe2a7446b1ccc3c9cf33888a21b8dd7e1b0f6b43..9ea1e7ddd6678bd83b25a6a5b5c418a261d64fca 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 0000000000000000000000000000000000000000..8cf5412b3b88ef622f177f1b972b5458420fb6db --- /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 0000000000000000000000000000000000000000..920e2a4d90b6d6921247740163218f5e0d0ff6f8 --- /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 0000000000000000000000000000000000000000..3d559a4db995b888a9a489050bd3ffd6ae9a9b3b --- /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 10ac0554d91537fe3e29cf63dca62927972137d3..b3dc383a05b7ac6705af34de8cad4f747cb1d23f 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 0000000000000000000000000000000000000000..43ba86d29ab7e9435c06a79c4115c32348ae148d --- /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 0000000000000000000000000000000000000000..159e2f9b493ba702f56e42486d22f4dfdd35e637 --- /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 0000000000000000000000000000000000000000..002a8e9821ed03d096286687d53fc436ebad1a8b --- /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 0afc99700d449104f3484ba4ca8bb252e1f72dc7..b92440669617784d01edfeafdd13c2b71230f8a5 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 465e224082300bd8011abb2880cff6d50aaffeb2..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..5d152935852e96b6ade70b8f52ece81e17b80dbd --- /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 0000000000000000000000000000000000000000..11f52612bb69eeb1c938efc2464966ab870cd34d --- /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 0000000000000000000000000000000000000000..1090fba61cfacc30ebff5f997bc7c4a5ea2d7c4d --- /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 639cd9fd0d152734ba2a4cd4d27181764e4fc57a..bdef2fce94069deaa0f1ec16d1aa53614409d2ec 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 f0545bd4e2f1e229090686491046800b1ada445b..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..15c44f91e6cc039bec703f199441287862abf1f4 --- /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 0000000000000000000000000000000000000000..105125dad6e3a9135a72e734157ae49f8047118c --- /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 0000000000000000000000000000000000000000..c912a5ccf4b92d37bec14ab658b3a5275e20c7ff --- /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 6c92a08f242f7d1826f14454b438b7cbf0fc0eda..c35b2bccebf5e644b82695279b74b3331eec9c71 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 43c5045e0cfa45ad13d8a78f3316fe91d7802d3a..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..2cce77bc8b0be8823bc2eca88a9b08d9efb3fb7e --- /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 0000000000000000000000000000000000000000..7d061693b28ac56fa02c077090d475e5e4b5f3e1 --- /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 0000000000000000000000000000000000000000..c41c3e9dbcb3e849352579a6e78264dcd4761ef3 --- /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');