From 715b9052cf2cde33d35b6203e762b77b5639ca77 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 17 May 2017 15:27:51 -0400 Subject: [PATCH] Remove unnecessary tests These tests are not adding any coverage to the respective API they should be covering. There are other files checking cases for array-like objects, and playing this with the global might cause issues and unnexpected behavior on specific environments like browsers. --- .../Array/prototype/every/15.4.4.16-2-15.js | 23 ----------------- .../prototype/every/15.4.4.16-7-c-i-23.js | 22 ---------------- .../Array/prototype/filter/15.4.4.20-2-15.js | 19 -------------- .../prototype/filter/15.4.4.20-9-c-i-23.js | 20 --------------- .../Array/prototype/forEach/15.4.4.18-2-15.js | 20 --------------- .../prototype/forEach/15.4.4.18-7-c-i-23.js | 24 ------------------ .../Array/prototype/indexOf/15.4.4.14-1-17.js | 12 --------- .../Array/prototype/indexOf/15.4.4.14-2-15.js | 20 --------------- .../prototype/indexOf/15.4.4.14-9-b-i-23.js | 18 ------------- .../prototype/lastIndexOf/15.4.4.15-1-17.js | 14 ----------- .../prototype/lastIndexOf/15.4.4.15-2-15.js | 22 ---------------- .../lastIndexOf/15.4.4.15-8-b-i-23.js | 18 ------------- .../Array/prototype/map/15.4.4.19-2-15.js | 21 ---------------- .../Array/prototype/map/15.4.4.19-8-c-i-23.js | 25 ------------------- .../Array/prototype/reduce/15.4.4.21-2-15.js | 18 ------------- .../reduce/15.4.4.21-8-b-iii-1-23.js | 25 ------------------- .../prototype/reduce/15.4.4.21-9-c-i-23.js | 25 ------------------- .../prototype/reduceRight/15.4.4.22-2-15.js | 25 ------------------- .../reduceRight/15.4.4.22-8-b-iii-1-23.js | 25 ------------------- .../reduceRight/15.4.4.22-9-c-i-23.js | 25 ------------------- .../Array/prototype/some/15.4.4.17-2-15.js | 23 ----------------- .../prototype/some/15.4.4.17-7-c-i-23.js | 21 ---------------- 22 files changed, 465 deletions(-) delete mode 100644 test/built-ins/Array/prototype/every/15.4.4.16-2-15.js delete mode 100644 test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js delete mode 100644 test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js delete mode 100644 test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js delete mode 100644 test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js delete mode 100644 test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js delete mode 100644 test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js delete mode 100644 test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js delete mode 100644 test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js delete mode 100644 test/built-ins/Array/prototype/map/15.4.4.19-2-15.js delete mode 100644 test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js delete mode 100644 test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js delete mode 100644 test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js delete mode 100644 test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js delete mode 100644 test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js delete mode 100644 test/built-ins/Array/prototype/some/15.4.4.17-2-15.js delete mode 100644 test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js deleted file mode 100644 index a93cc3ec0a..0000000000 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-15.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.16-2-15 -description: Array.prototype.every - 'length' is property of the global object ----*/ - - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - -assert(Array.prototype.every.call(this, callbackfn1), 'Array.prototype.every.call(this, callbackfn1) !== true'); -assert.sameValue(Array.prototype.every.call(this, callbackfn2), false, 'Array.prototype.every.call(this, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js deleted file mode 100644 index 5dc89662d3..0000000000 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-23.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.16-7-c-i-23 -description: > - Array.prototype.every - This object is an global object which - contains index property ----*/ - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } - - this[0] = 11; - this.length = 1; - -assert.sameValue(Array.prototype.every.call(this, callbackfn), false, 'Array.prototype.every.call(this, callbackfn)'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js deleted file mode 100644 index 134c3a1b4e..0000000000 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-15.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.20-2-15 -description: Array.prototype.filter - 'length' is property of the global object ----*/ - - function callbackfn(val, idx, obj) { - return obj.length === 2; - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - var newArr = Array.prototype.filter.call(this, callbackfn); - -assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js deleted file mode 100644 index 360150f3d9..0000000000 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-23.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.20-9-c-i-23 -description: > - Array.prototype.filter - This object is the global object which - contains index property ----*/ - - function callbackfn(val, idx, obj) { - return idx === 0 && val === 11; - } - - this[0] = 11; - this.length = 1; - var newArr = Array.prototype.filter.call(this, callbackfn); - -assert.sameValue(newArr.length, 1, 'newArr.length'); -assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js deleted file mode 100644 index a6c9d3031d..0000000000 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-15.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.18-2-15 -description: Array.prototype.forEach - 'length' is property of the global object ----*/ - - var result = false; - function callbackfn(val, idx, obj) { - result = (obj.length === 2); - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - Array.prototype.forEach.call(this, callbackfn); - -assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js deleted file mode 100644 index dc4c479d63..0000000000 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-23.js +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.18-7-c-i-23 -description: > - Array.prototype.forEach - This object is an global object which - contains index property ----*/ - - var testResult = false; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - testResult = (val === 11); - } - } - - this[0] = 11; - this.length = 1; - - Array.prototype.forEach.call(this, callbackfn); - -assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js deleted file mode 100644 index 669fef35ce..0000000000 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-17.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.14-1-17 -description: Array.prototype.indexOf applied to the global object ----*/ - - this[1] = true; - this.length = 2; - -assert.sameValue(Array.prototype.indexOf.call(this, true), 1, 'Array.prototype.indexOf.call(this, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js deleted file mode 100644 index 82e0516273..0000000000 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-15.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.14-2-15 -description: Array.prototype.indexOf - 'length' is property of the global object ----*/ - - var targetObj = {}; - - this.length = 2; - - this[1] = targetObj; - -assert.sameValue(Array.prototype.indexOf.call(this, targetObj), 1, 'Array.prototype.indexOf.call(this, targetObj)'); - - this[1] = {}; - this[2] = targetObj; - -assert.sameValue(Array.prototype.indexOf.call(this, targetObj), -1, 'Array.prototype.indexOf.call(this, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js deleted file mode 100644 index df488c2476..0000000000 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-23.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.14-9-b-i-23 -description: Array.prototype.indexOf - This object is the global object ----*/ - - var targetObj = {}; - - this[0] = targetObj; - this[100] = "100"; - this[200] = "200"; - this.length = 200; - -assert.sameValue(Array.prototype.indexOf.call(this, targetObj), 0, 'Array.prototype.indexOf.call(this, targetObj)'); -assert.sameValue(Array.prototype.indexOf.call(this, "100"), 100, 'Array.prototype.indexOf.call(this, "100")'); -assert.sameValue(Array.prototype.indexOf.call(this, "200"), -1, 'Array.prototype.indexOf.call(this, "200")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js deleted file mode 100644 index 30e5594bee..0000000000 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-17.js +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.15-1-17 -description: Array.prototype.lastIndexOf applied to the global object ----*/ - - var targetObj = ["global"]; - - this[1] = targetObj; - this.length = 3; - -assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 1, 'Array.prototype.lastIndexOf.call(this, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js deleted file mode 100644 index 584ad1a43d..0000000000 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-15.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.15-2-15 -description: > - Array.prototype.lastIndexOf - 'length' is property of the global - object ----*/ - - var targetObj = {}; - - this.length = 2; - - this[1] = targetObj; - -assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 1); - - this[1] = {}; - this[2] = targetObj; - -assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), -1); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js deleted file mode 100644 index 333a5ef45a..0000000000 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-23.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.15-8-b-i-23 -description: Array.prototype.lastIndexOf - This object is the global object ----*/ - - var targetObj = {}; - - this[0] = targetObj; - this[100] = "100"; - this[200] = "200"; - this.length = 200; - -assert.sameValue(Array.prototype.lastIndexOf.call(this, targetObj), 0, 'Array.prototype.lastIndexOf.call(this, targetObj)'); -assert.sameValue(Array.prototype.lastIndexOf.call(this, "100"), 100, 'Array.prototype.lastIndexOf.call(this, "100")'); -assert.sameValue(Array.prototype.lastIndexOf.call(this, "200"), -1, 'Array.prototype.lastIndexOf.call(this, "200")'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js deleted file mode 100644 index e3a8db9aba..0000000000 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-15.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.19-2-15 -description: > - Array.prototype.map - when 'length' is property of the global - object ----*/ - - function callbackfn(val, idx, obj) { - return val > 10; - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - var testResult = Array.prototype.map.call(this, callbackfn); - -assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js deleted file mode 100644 index f50523c573..0000000000 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-23.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.19-8-c-i-23 -description: > - Array.prototype.map - This object is the global object which - contains index property ----*/ - - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === kValue; - } - return false; - } - - this[0] = kValue; - this.length = 2; - - var testResult = Array.prototype.map.call(this, callbackfn); - -assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js deleted file mode 100644 index 0db78b27d1..0000000000 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-15.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.21-2-15 -description: Array.prototype.reduce - 'length' is property of the global object ----*/ - - function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - -assert.sameValue(Array.prototype.reduce.call(this, callbackfn, 1), true, 'Array.prototype.reduce.call(this, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js deleted file mode 100644 index f3e097b508..0000000000 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-23.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.21-8-b-iii-1-23 -description: > - Array.prototype.reduce - This object is the global object which - contains index property ----*/ - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 0); - } - } - - this[0] = 0; - this[1] = 1; - this[2] = 2; - this.length = 3; - - Array.prototype.reduce.call(this, callbackfn); - -assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js deleted file mode 100644 index 31102135e9..0000000000 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-23.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.21-9-c-i-23 -description: > - Array.prototype.reduce - This object is the global object which - contains index property ----*/ - - var testResult = false; - var initialValue = 0; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - this[0] = 0; - this[1] = 1; - this.length = 2; - - Array.prototype.reduce.call(this, callbackfn, initialValue); - -assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js deleted file mode 100644 index 37e997477e..0000000000 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-15.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.22-2-15 -description: > - Array.prototype.reduceRight - 'length' is property of the global - object ----*/ - -var global = this; - var accessed = false; - - function callbackfn(prevVal, curVal, idx, obj) { - accessed = true; - return obj.length === global.length; - } - - this[0] = 12; - this[1] = 11; - this[2] = 9; - this.length = 2; - -assert(Array.prototype.reduceRight.call(this, callbackfn, 111), 'Array.prototype.reduceRight.call(this, callbackfn, 111) !== true'); -assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js deleted file mode 100644 index 9d6f73a1c1..0000000000 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-23.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.22-8-b-iii-1-23 -description: > - Array.prototype.reduceRight - This object is the global object - which contains index property ----*/ - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (prevVal === 2); - } - } - - this[0] = 0; - this[1] = 1; - this[2] = 2; - this.length = 3; - - Array.prototype.reduceRight.call(this, callbackfn); - -assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js deleted file mode 100644 index 585c5f10c8..0000000000 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-23.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.22-9-c-i-23 -description: > - Array.prototype.reduceRight - This object is an global object - which contains index property ----*/ - - var testResult = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx === 1) { - testResult = (curVal === 1); - } - } - - this[0] = 0; - this[1] = 1; - this[2] = 2; - this.length = 3; - - Array.prototype.reduceRight.call(this, callbackfn, "initialValue"); - -assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js deleted file mode 100644 index ed30df4191..0000000000 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-15.js +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.17-2-15 -description: Array.prototype.some - 'length' is property of the global object ----*/ - - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - this[0] = 9; - this[1] = 11; - this[2] = 12; - this.length = 2; - -assert(Array.prototype.some.call(this, callbackfn1), 'Array.prototype.some.call(this, callbackfn1) !== true'); -assert.sameValue(Array.prototype.some.call(this, callbackfn2), false, 'Array.prototype.some.call(this, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js deleted file mode 100644 index e626dfe745..0000000000 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-23.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012 Ecma International. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es5id: 15.4.4.17-7-c-i-23 -description: > - Array.prototype.some - This object is an global object which - contains index property ----*/ - - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 11; - } - return false; - } - - this[0] = 11; - this.length = 1; - -assert(Array.prototype.some.call(this, callbackfn), 'Array.prototype.some.call(this, callbackfn) !== true');