Merge pull request #1040 from leobalter/remove-unnecessary-tests

Remove unnecessary tests
This commit is contained in:
Rick Waldron 2017-05-17 15:46:04 -04:00 committed by GitHub
commit 5c8f4db9d7
22 changed files with 0 additions and 465 deletions

View File

@ -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)');

View File

@ -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)');

View File

@ -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');

View File

@ -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]');

View File

@ -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');

View File

@ -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');

View File

@ -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)');

View File

@ -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)');

View File

@ -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")');

View File

@ -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)');

View File

@ -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);

View File

@ -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")');

View File

@ -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');

View File

@ -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]');

View File

@ -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)');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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)');

View File

@ -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');