add esid to array/prototype/reduceRight tests (#1118)

This commit is contained in:
Sue Lockwood 2017-06-30 07:45:25 -07:00 committed by Leo Balter
parent 051bbb88ff
commit 73ec5e6cd9
251 changed files with 287 additions and 36 deletions

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-1
description: Array.prototype.reduceRight applied to undefined throws a TypeError
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-10
description: Array.prototype.reduceRight applied to the Math object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-11
description: Array.prototype.reduceRight applied to Date object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-12
description: Array.prototype.reduceRight applied to RegExp object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-13
description: Array.prototype.reduceRight applied to the JSON object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-14
description: Array.prototype.reduceRight applied to Error object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-15
description: Array.prototype.reduceRight applied to the Arguments object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-2
description: Array.prototype.reduceRight applied to null throws a TypeError
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-3
description: Array.prototype.reduceRight applied to boolean primitive
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-4
description: Array.prototype.reduceRight applied to Boolean object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-5
description: Array.prototype.reduceRight applied to number primitive
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-6
description: Array.prototype.reduceRight applied to Number object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-7
description: Array.prototype.reduceRight applied to string primitive
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-8
description: Array.prototype.reduceRight applied to String object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-1-9
description: Array.prototype.reduceRight applied to Function object
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-1
description: >
Array.prototype.reduceRight doesn't mutate the Array on which it

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-2
description: >
Array.prototype.reduceRight reduces array in descending order of

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-3
description: Array.prototype.reduceRight - subclassed array with length 1
---*/
@ -9,7 +10,7 @@ description: Array.prototype.reduceRight - subclassed array with length 1
foo.prototype = [1];
function foo() {}
var f = new foo();
function cb(){}
assert.sameValue(f.reduceRight(cb), 1, 'f.reduceRight(cb)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-4
description: >
Array.prototype.reduceRight - subclassed array with length more
@ -11,7 +12,7 @@ description: >
foo.prototype = new Array(0, 1, 2, 3);
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
assert.sameValue(f.reduceRight(cb), 6, 'f.reduceRight(cb)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-5
description: >
Array.prototype.reduceRight reduces array in descending order of

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-6
description: >
Array.prototype.reduceRight - subclassed array when initialvalue
@ -11,7 +12,7 @@ description: >
foo.prototype = new Array(0, 1, 2, 3);
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
assert.sameValue(f.reduceRight(cb,"4"), "43210", 'f.reduceRight(cb,"4")');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-7
description: >
Array.prototype.reduceRight - subclassed array when length to 1
@ -11,7 +12,7 @@ description: >
foo.prototype = [1];
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
assert.sameValue(f.reduceRight(cb,"4"), "41", 'f.reduceRight(cb,"4")');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-10-8
description: Array.prototype.reduceRight doesn't visit expandos
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-1
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-10
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-11
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-12
description: >
Array.prototype.reduceRight - 'length' is own accessor property

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-13
description: >
Array.prototype.reduceRight applied to the Array-like object that

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-14
description: >
Array.prototype.reduceRight applied to the Array-like object that

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-17
description: >
Array.prototype.reduceRight applied to the Arguments object, which

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-18
description: >
Array.prototype.reduceRight applied to String object, which

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-19
description: >
Array.prototype.reduceRight applied to Function object, which

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-2
description: >
Array.prototype.reduceRight - 'length' is own data property on an

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-3
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-4
description: >
Array.prototype.reduceRight - 'length' is own data property that

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-5
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-6
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-7
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-8
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-2-9
description: >
Array.prototype.reduceRight applied to Array-like object, 'length'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-1
description: Array.prototype.reduceRight - value of 'length' is undefined
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-10
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-11
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-12
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-13
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-14
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-15
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-16
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-17
description: >
Array.prototype.reduceRight - value of 'length' is a string

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-18
description: >
Array.prototype.reduceRight - value of 'length' is a string that

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-19
description: >
Array.prototype.reduceRight - value of 'length' is an object which

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-2
description: >
Array.prototype.reduceRight applied to an Array-like object,

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-20
description: >
Array.prototype.reduceRight - value of 'length' is an Object which

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-21
description: >
Array.prototype.reduceRight - 'length' is an object that has an

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-22
description: >
Array.prototype.reduceRight throws TypeError exception when

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-23
description: >
Array.prototype.reduceRight uses inherited valueOf method when

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-24
description: >
Array.prototype.reduceRight - value of 'length' is a positive

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-25
description: >
Array.prototype.reduceRight - value of 'length' is a negative

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-3
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-4
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-5
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-6
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-7
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-3-9
description: >
Array.prototype.reduceRight - value of 'length' is a number (value

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-1
description: >
Array.prototype.reduceRight throws TypeError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-10
description: >
Array.prototype.reduceRight - the exception is not thrown if

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-11
description: >
Array.prototype.reduceRight - the exception is not thrown if

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-12
description: Array.prototype.reduceRight - 'callbackfn' is a function
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-15
description: >
Array.prototype.reduceRight - calling with no callbackfn is the

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-2
description: >
Array.prototype.reduceRight throws ReferenceError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-3
description: Array.prototype.reduceRight throws TypeError if callbackfn is null
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-4
description: >
Array.prototype.reduceRight throws TypeError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-5
description: >
Array.prototype.reduceRight throws TypeError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-6
description: >
Array.prototype.reduceRight throws TypeError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-7
description: >
Array.prototype.reduceRight throws TypeError if callbackfn is

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-8
description: >
Array.prototype.reduceRight - side effects produced by step 2 are

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-4-9
description: >
Array.prototype.reduceRight - side effects produced by step 3 are

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-1
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-10
description: >
Array.prototype.reduceRight - side-effects produced by step 2 when

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-11
description: >
Array.prototype.reduceRight - side-effects produced by step 3 when

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-12
description: >
Array.prototype.reduceRight - the exception is not thrown if

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-13
description: >
Array.prototype.reduceRight - the exception is not thrown if

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-2
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -13,7 +14,7 @@ description: >
function foo() {}
var f = new foo();
f.length = null;
function cb(){}
assert.throws(TypeError, function() {
f.reduceRight(cb);

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-3
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -13,7 +14,7 @@ description: >
function foo() {}
var f = new foo();
f.length = false;
function cb(){}
assert.throws(TypeError, function() {
f.reduceRight(cb);

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-4
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -13,7 +14,7 @@ description: >
function foo() {}
var f = new foo();
f.length = 0;
function cb(){}
assert.throws(TypeError, function() {
f.reduceRight(cb);

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-5
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -13,7 +14,7 @@ description: >
function foo() {}
var f = new foo();
f.length = '0';
function cb(){}
assert.throws(TypeError, function() {
f.reduceRight(cb);

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-6
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -12,10 +13,10 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
var o = { valueOf: function () { return 0;}};
f.length = o;
function cb(){}
assert.throws(TypeError, function() {
f.reduceRight(cb);

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-7
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -12,10 +13,10 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
var o = { toString: function () { return '0';}};
f.length = o;
// objects inherit the default valueOf method of the Object object;
// that simply returns the itself. Since the default valueOf() method
// does not return a primitive value, ES next tries to convert the object

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-8
description: >
Array.prototype.reduceRight throws TypeError if 'length' is 0
@ -11,9 +12,9 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
f.length = [];
// objects inherit the default valueOf method of the Object object;
// that simply returns the itself. Since the default valueOf() method
// does not return a primitive value, ES next tries to convert the object

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-5-9
description: >
Array.prototype.reduceRight - 'initialValue' is returned if 'len'

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-1
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-10
description: Array.prototype.reduceRight - 'initialValue' is present
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-11
description: Array.prototype.reduceRight - 'initialValue' is not present
---*/

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-2
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = null;
function cb(){}
assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-3
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = false;
function cb(){}
assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-4
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = 0;
function cb(){}
assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-5
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = '0';
function cb(){}
assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-6
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -12,9 +13,9 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
var o = { valueOf: function () { return 0;}};
f.length = o;
function cb(){}
assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)');

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-7
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -12,10 +13,10 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
var o = { toString: function () { return '0';}};
f.length = o;
// objects inherit the default valueOf method of the Object object;
// that simply returns the itself. Since the default valueOf() method
// does not return a primitive value, ES next tries to convert the object

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-array.prototype.reduceright
es5id: 15.4.4.22-7-8
description: >
Array.prototype.reduceRight returns initialValue if 'length' is 0
@ -12,9 +13,9 @@ description: >
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
f.length = [];
// objects inherit the default valueOf method of the Object object;
// that simply returns the itself. Since the default valueOf() method
// does not return a primitive value, ES next tries to convert the object

Some files were not shown because too many files have changed in this diff Show More