add esid to array/prototype/reduce tests (#1117)

This commit is contained in:
Sue Lockwood 2017-06-30 07:45:16 -07:00 committed by Leo Balter
parent 5ff6550197
commit 051bbb88ff
252 changed files with 290 additions and 38 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-1 es5id: 15.4.4.21-2-1
description: > description: >
Array.prototype.reduce - 'length' is own data property on an Array.prototype.reduce - '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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-10 es5id: 15.4.4.21-2-10
description: > description: >
Array.prototype.reduce applied to Array-like object, 'length' is Array.prototype.reduce applied to Array-like object, 'length' is

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-14 es5id: 15.4.4.21-2-14
description: > description: >
Array.prototype.reduce applied to the Array-like object that Array.prototype.reduce 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-17 es5id: 15.4.4.21-2-17
description: > description: >
Array.prototype.reduce applied to the Arguments object, which Array.prototype.reduce 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-18 es5id: 15.4.4.21-2-18
description: > description: >
Array.prototype.reduce applied to String object, which implements Array.prototype.reduce applied to String object, which implements

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-4 es5id: 15.4.4.21-2-4
description: > description: >
Array.prototype.reduce - 'length' is own data property that Array.prototype.reduce - '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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-5 es5id: 15.4.4.21-2-5
description: > description: >
Array.prototype.reduce applied to Array-like object, 'length' is Array.prototype.reduce applied to Array-like object, 'length' is

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-14 es5id: 15.4.4.21-3-14
description: Array.prototype.reduce - 'length' is a string containing -Infinity description: Array.prototype.reduce - 'length' is a string containing -Infinity
---*/ ---*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-24 es5id: 15.4.4.21-3-24
description: > description: >
Array.prototype.reduce - value of 'length' is a positive Array.prototype.reduce - 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-25 es5id: 15.4.4.21-3-25
description: > description: >
Array.prototype.reduce - value of 'length' is a negative Array.prototype.reduce - 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-3 es5id: 15.4.4.21-3-3
description: Array.prototype.reduce - value of 'length' is a number (value is 0) description: Array.prototype.reduce - value of 'length' is a number (value is 0)
---*/ ---*/

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-3 es5id: 15.4.4.21-4-3
description: Array.prototype.reduce throws TypeError if callbackfn is null description: Array.prototype.reduce 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-4 es5id: 15.4.4.21-4-4
description: Array.prototype.reduce throws TypeError if callbackfn is boolean description: Array.prototype.reduce throws TypeError if callbackfn is boolean
---*/ ---*/

View File

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

View File

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

View File

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

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-8 es5id: 15.4.4.21-4-8
description: > description: >
Array.prototype.reduce - side effects produced by step 2 are Array.prototype.reduce - 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-9 es5id: 15.4.4.21-4-9
description: > description: >
Array.prototype.reduce - side effects produced by step 3 are Array.prototype.reduce - 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-1 es5id: 15.4.4.21-5-1
description: > description: >
Array.prototype.reduce throws TypeError if 'length' is 0 (empty Array.prototype.reduce throws TypeError if 'length' is 0 (empty

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-10 es5id: 15.4.4.21-5-10
description: > description: >
Array.prototype.reduce - if exception occurs, it occurs after any Array.prototype.reduce - if exception occurs, it occurs after any

View File

@ -2,6 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-11 es5id: 15.4.4.21-5-11
description: > description: >
Array.prototype.reduce - if the exception occurs, it occurs after Array.prototype.reduce - if the exception occurs, it occurs after

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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