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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-1
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-10
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-11
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-12
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-13
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-14
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-15
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-2
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-3
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-4
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-5
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-6
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-7
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-8
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-1-9
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-1
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-2
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-3
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];
function foo() {}
var f = new foo();
function 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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-4
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);
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-5
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-6
description: >
Array.prototype.reduce - subclassed array when initialvalue
@ -11,7 +12,7 @@ description: >
foo.prototype = [1,2,3,4];
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-7
description: >
Array.prototype.reduce - subclassed array with length 1 and
@ -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.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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-10-8
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-1
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-10
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-11
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-12
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-13
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-14
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-17
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-18
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-19
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-2
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-3
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-4
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-5
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-6
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-7
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-8
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-2-9
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-1
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-10
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-11
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-12
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-13
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-14
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-15
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-16
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-17
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-18
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-19
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-2
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-20
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-21
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-22
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-23
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-24
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-25
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-3
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-4
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-5
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-6
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-7
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-3-9
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-1
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-10
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-11
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-12
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-15
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-2
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-3
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-4
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-5
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-6
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-7
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-8
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-4-9
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-1
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-10
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-11
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-12
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-13
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-5-2
description: >
Array.prototype.reduce 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.reduce(cb);

View File

@ -2,6 +2,7 @@
// 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
description: >
Array.prototype.reduce 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.reduce(cb);

View File

@ -2,6 +2,7 @@
// 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
description: >
Array.prototype.reduce 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.reduce(cb);

View File

@ -2,6 +2,7 @@
// 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
description: >
Array.prototype.reduce 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.reduce(cb);

View File

@ -2,6 +2,7 @@
// 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
description: >
Array.prototype.reduce 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.reduce(cb);

View File

@ -2,6 +2,7 @@
// 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
description: >
Array.prototype.reduce 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.reduce
es5id: 15.4.4.21-5-8
description: >
Array.prototype.reduce 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.reduce
es5id: 15.4.4.21-5-9
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-1
description: >
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-10
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-11
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-2
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = null;
function cb(){}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-3
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = false;
function cb(){}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-4
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = 0;
function cb(){}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-5
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -13,6 +14,6 @@ description: >
function foo() {}
var f = new foo();
f.length = '0';
function cb(){}
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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-6
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -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.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.
/*---
esid: sec-array.prototype.reduce
es5id: 15.4.4.21-7-7
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -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.reduce
es5id: 15.4.4.21-7-8
description: >
Array.prototype.reduce returns initialValue if 'length' is 0 and
@ -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