Replace runTestCase with assert helpers [test/built-ins/Array/prototype/every]

This commit is contained in:
André Bargull 2015-08-06 18:15:59 +02:00
parent e8246fd9f0
commit a87aedd8a5
169 changed files with 324 additions and 1044 deletions

View File

@ -4,13 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-0-1 es5id: 15.4.4.16-0-1
description: Array.prototype.every must exist as a function description: Array.prototype.every must exist as a function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var f = Array.prototype.every; var f = Array.prototype.every;
if (typeof(f) === "function") {
return true; assert.sameValue(typeof(f), "function", 'typeof(f)');
}
}
runTestCase(testcase);

View File

@ -4,12 +4,6 @@
/*--- /*---
es5id: 15.4.4.16-0-2 es5id: 15.4.4.16-0-2
description: Array.prototype.every.length must be 1 description: Array.prototype.every.length must be 1
includes: [runTestCase.js]
---*/ ---*/
function testcase() { assert.sameValue(Array.prototype.every.length, 1, 'Array.prototype.every.length');
if (Array.prototype.every.length === 1) {
return true;
}
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-11 es5id: 15.4.4.16-1-11
description: Array.prototype.every applied to Date object description: Array.prototype.every applied to Date object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof Date); return !(obj instanceof Date);
} }
@ -16,6 +14,4 @@ function testcase() {
obj.length = 1; obj.length = 1;
obj[0] = 1; obj[0] = 1;
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-12 es5id: 15.4.4.16-1-12
description: Array.prototype.every applied to RegExp object description: Array.prototype.every applied to RegExp object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof RegExp); return !(obj instanceof RegExp);
} }
@ -16,6 +14,4 @@ function testcase() {
obj.length = 1; obj.length = 1;
obj[0] = 1; obj[0] = 1;
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-14 es5id: 15.4.4.16-1-14
description: Array.prototype.every applied to Error object description: Array.prototype.every applied to Error object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof Error); return !(obj instanceof Error);
} }
@ -16,6 +14,4 @@ function testcase() {
obj.length = 1; obj.length = 1;
obj[0] = 1; obj[0] = 1;
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-15 es5id: 15.4.4.16-1-15
description: Array.prototype.every applied to the Arguments object description: Array.prototype.every applied to the Arguments object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return ('[object Arguments]' !== Object.prototype.toString.call(obj)); return ('[object Arguments]' !== Object.prototype.toString.call(obj));
} }
@ -16,6 +14,4 @@ function testcase() {
return arguments; return arguments;
}("a", "b")); }("a", "b"));
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-4 es5id: 15.4.4.16-1-4
description: Array.prototype.every applied to Boolean object description: Array.prototype.every applied to Boolean object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -18,6 +16,6 @@ function testcase() {
obj.length = 2; obj.length = 2;
obj[0] = 11; obj[0] = 11;
obj[1] = 12; obj[1] = 12;
return Array.prototype.every.call(obj, callbackfn) && accessed;
} assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
runTestCase(testcase); assert(accessed, 'accessed !== true');

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-6 es5id: 15.4.4.16-1-6
description: Array.prototype.every applied to Number object description: Array.prototype.every applied to Number object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -18,6 +16,6 @@ function testcase() {
obj.length = 2; obj.length = 2;
obj[0] = 11; obj[0] = 11;
obj[1] = 12; obj[1] = 12;
return Array.prototype.every.call(obj, callbackfn) && accessed;
} assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
runTestCase(testcase); assert(accessed, 'accessed !== true');

View File

@ -4,14 +4,10 @@
/*--- /*---
es5id: 15.4.4.16-1-7 es5id: 15.4.4.16-1-7
description: Array.prototype.every applied to string primitive description: Array.prototype.every applied to string primitive
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof String); return !(obj instanceof String);
} }
return !Array.prototype.every.call("hello\nworld\\!", callbackfn); assert.sameValue(Array.prototype.every.call("hello\nworld\\!", callbackfn), false, 'Array.prototype.every.call("hello\nworld\\!", callbackfn)');
}
runTestCase(testcase);

View File

@ -4,16 +4,12 @@
/*--- /*---
es5id: 15.4.4.16-1-8 es5id: 15.4.4.16-1-8
description: Array.prototype.every applied to String object description: Array.prototype.every applied to String object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof String); return !(obj instanceof String);
} }
var obj = new String("hello\nworld\\!"); var obj = new String("hello\nworld\\!");
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-1-9 es5id: 15.4.4.16-1-9
description: Array.prototype.every applied to Function object description: Array.prototype.every applied to Function object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return !(obj instanceof Function); return !(obj instanceof Function);
} }
@ -18,6 +16,4 @@ function testcase() {
obj[0] = 11; obj[0] = 11;
obj[1] = 9; obj[1] = 9;
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-1
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own data property own data property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -25,7 +23,5 @@ function testcase() {
length: 2 length: 2
}; };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-10
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
inherited accessor property inherited accessor property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -35,7 +33,5 @@ function testcase() {
child[1] = 11; child[1] = 11;
child[2] = 9; child[2] = 9;
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-11
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own accessor property without a get function own accessor property without a get function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -27,6 +24,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-13
description: > description: >
Array.prototype.every applied to the Array-like object that Array.prototype.every applied to the Array-like object that
'length' is inherited accessor property without a get function 'length' is inherited accessor property without a get function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -31,6 +28,5 @@ function testcase() {
child[0] = 9; child[0] = 9;
child[1] = 8; child[1] = 8;
return Array.prototype.every.call(child, callbackfn) && !accessed; assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-14
description: > description: >
Array.prototype.every applied to the Array-like object that Array.prototype.every applied to the Array-like object that
'length' property doesn't exist 'length' property doesn't exist
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, 1: 12 }; var obj = { 0: 11, 1: 12 };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-17
description: > description: >
Array.prototype.every applied to the Arguments object, which Array.prototype.every applied to the Arguments object, which
implements its own property get method implements its own property get method
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -24,6 +22,4 @@ function testcase() {
!Array.prototype.every.call(arguments, callbackfn2); !Array.prototype.every.call(arguments, callbackfn2);
}; };
return func(12, 11); assert(func(12, 11), 'func(12, 11) !== true');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-19
description: > description: >
Array.prototype.every applied to Function object, which implements Array.prototype.every applied to Function object, which implements
its own property get method its own property get method
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -25,7 +23,5 @@ function testcase() {
fun[1] = 11; fun[1] = 11;
fun[2] = 9; fun[2] = 9;
return Array.prototype.every.call(fun, callbackfn1) && assert(Array.prototype.every.call(fun, callbackfn1), 'Array.prototype.every.call(fun, callbackfn1) !== true');
!Array.prototype.every.call(fun, callbackfn2); assert.sameValue(Array.prototype.every.call(fun, callbackfn2), false, 'Array.prototype.every.call(fun, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-3
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own data property that overrides an inherited data property own data property that overrides an inherited data property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -29,7 +27,5 @@ function testcase() {
child[1] = 11; child[1] = 11;
child[2] = 9; child[2] = 9;
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-5
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own data property that overrides an inherited accessor property own data property that overrides an inherited accessor property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -40,7 +38,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-6
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
inherited data property inherited data property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -28,7 +26,5 @@ function testcase() {
child[1] = 11; child[1] = 11;
child[2] = 9; child[2] = 9;
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-7
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own accessor property own accessor property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -31,7 +29,5 @@ function testcase() {
obj[1] = 11; obj[1] = 11;
obj[2] = 9; obj[2] = 9;
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-8
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own accessor property that overrides an inherited data property own accessor property that overrides an inherited data property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -36,7 +34,5 @@ function testcase() {
child[1] = 11; child[1] = 11;
child[2] = 9; child[2] = 9;
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-9
description: > description: >
Array.prototype.every applied to Array-like object, 'length' is an Array.prototype.every applied to Array-like object, 'length' is an
own accessor property that overrides an inherited accessor property own accessor property that overrides an inherited accessor property
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -43,7 +41,5 @@ function testcase() {
child[1] = 11; child[1] = 11;
child[2] = 9; child[2] = 9;
return Array.prototype.every.call(child, callbackfn1) && assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true');
!Array.prototype.every.call(child, callbackfn2); assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)');
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-1 es5id: 15.4.4.16-3-1
description: Array.prototype.every - value of 'length' is undefined description: Array.prototype.every - value of 'length' is undefined
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 9, length: undefined }; var obj = { 0: 9, length: undefined };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-10
description: > description: >
Array.prototype.every - value of 'length' is a number (value is Array.prototype.every - value of 'length' is a number (value is
NaN) NaN)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 9, length: NaN }; var obj = { 0: 9, length: NaN };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-11
description: > description: >
Array.prototype.every - 'length' is a string containing a positive Array.prototype.every - 'length' is a string containing a positive
number number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; var obj = { 0: 12, 1: 11, 2: 9, length: "2" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-12
description: > description: >
Array.prototype.every - 'length' is a string containing a negative Array.prototype.every - 'length' is a string containing a negative
number number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
Array.prototype.every.call(obj, callbackfn2); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-13
description: > description: >
Array.prototype.every - 'length' is a string containing a decimal Array.prototype.every - 'length' is a string containing a decimal
number number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-14 es5id: 15.4.4.16-3-14
description: Array.prototype.every - 'length' is a string containing +/-Infinity description: Array.prototype.every - 'length' is a string containing +/-Infinity
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,8 +17,7 @@ function testcase() {
var objTwo = { 0: 9, length: "+Infinity" }; var objTwo = { 0: 9, length: "+Infinity" };
var objThree = { 0: 9, length: "-Infinity" }; var objThree = { 0: 9, length: "-Infinity" };
return !Array.prototype.every.call(objOne, callbackfn) && assert.sameValue(Array.prototype.every.call(objOne, callbackfn), false, 'Array.prototype.every.call(objOne, callbackfn)');
!Array.prototype.every.call(objTwo, callbackfn) && assert.sameValue(Array.prototype.every.call(objTwo, callbackfn), false, 'Array.prototype.every.call(objTwo, callbackfn)');
Array.prototype.every.call(objThree, callbackfn) && accessed; assert(Array.prototype.every.call(objThree, callbackfn), 'Array.prototype.every.call(objThree, callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-15
description: > description: >
Array.prototype.every - 'length' is a string containing an Array.prototype.every - 'length' is a string containing an
exponential number exponential number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-16
description: > description: >
Array.prototype.every - 'length' is a string containing a hex Array.prototype.every - 'length' is a string containing a hex
number number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-17
description: > description: >
Array.prototype.every - 'length' is a string containing a number Array.prototype.every - 'length' is a string containing a number
with leading zeros with leading zeros
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-18
description: > description: >
Array.prototype.every - value of 'length' is a string that can't Array.prototype.every - value of 'length' is a string that can't
convert to a number convert to a number
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 9, 1: 8, length: "two" }; var obj = { 0: 9, 1: 8, length: "two" };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-19
description: > description: >
Array.prototype.every - value of 'length' is an Object which has Array.prototype.every - value of 'length' is an Object which has
an own toString method an own toString method
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -37,7 +35,7 @@ function testcase() {
// 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
// to a number by calling its toString() method and converting the // to a number by calling its toString() method and converting the
// resulting string to a number. // resulting string to a number.
return Array.prototype.every.call(obj, callbackfn1) &&
!Array.prototype.every.call(obj, callbackfn2) && toStringAccessed; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
} assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
runTestCase(testcase); assert(toStringAccessed, 'toStringAccessed !== true');

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-2
description: > description: >
Array.prototype.every on an Array-like object if 'length' is 1 Array.prototype.every on an Array-like object if 'length' is 1
(length overridden to true(type conversion)) (length overridden to true(type conversion))
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -21,7 +18,5 @@ function testcase() {
var obj = { 0: 11, 1: 9, length: true }; var obj = { 0: 11, 1: 9, length: true };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-20
description: > description: >
Array.prototype.every - value of 'length' is an Object which has Array.prototype.every - value of 'length' is an Object which has
an own valueOf method an own valueOf method
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -32,7 +30,6 @@ function testcase() {
} }
}; };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed; assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
} assert(valueOfAccessed, 'valueOfAccessed !== true');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Array.prototype.every - 'length' is an object that has an own Array.prototype.every - 'length' is an object that has an own
valueOf method that returns an object and toString method that valueOf method that returns an object and toString method that
returns a string returns a string
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -38,9 +36,7 @@ function testcase() {
} }
}; };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2) && assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
valueOfAccessed && assert(valueOfAccessed, 'valueOfAccessed !== true');
toStringAccessed; assert(toStringAccessed, 'toStringAccessed !== true');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-23
description: > description: >
Array.prototype.every uses inherited valueOf method when 'length' Array.prototype.every uses inherited valueOf method when 'length'
is an object with an own toString and inherited valueOf methods is an object with an own toString and inherited valueOf methods
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -46,8 +43,7 @@ function testcase() {
length: child length: child
}; };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2) && assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
valueOfAccessed && !toStringAccessed; assert(valueOfAccessed, 'valueOfAccessed !== true');
} assert.sameValue(toStringAccessed, false, 'toStringAccessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-24
description: > description: >
Array.prototype.every - value of 'length' is a positive Array.prototype.every - value of 'length' is a positive
non-integer, ensure truncation occurs in the proper direction non-integer, ensure truncation occurs in the proper direction
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-25 es5id: 15.4.4.16-3-25
description: Array.prototype.every - value of 'length' is a negative non-integer description: Array.prototype.every - value of 'length' is a negative non-integer
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -23,7 +21,5 @@ function testcase() {
length: -4294967294.5 length: -4294967294.5
}; };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
Array.prototype.every.call(obj, callbackfn2); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-29
description: > description: >
Array.prototype.every - value of 'length' is boundary value (2^32 Array.prototype.every - value of 'length' is boundary value (2^32
+ 1) + 1)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -24,7 +22,5 @@ function testcase() {
length: 4294967297 length: 4294967297
}; };
return !Array.prototype.every.call(obj, callbackfn1) && assert.sameValue(Array.prototype.every.call(obj, callbackfn1), false, 'Array.prototype.every.call(obj, callbackfn1)');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-3 es5id: 15.4.4.16-3-3
description: Array.prototype.every - value of 'length' is a number (value is 0) description: Array.prototype.every - value of 'length' is a number (value is 0)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 9, length: 0 }; var obj = { 0: 9, length: 0 };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-4 es5id: 15.4.4.16-3-4
description: Array.prototype.every - value of 'length' is a number (value is +0) description: Array.prototype.every - value of 'length' is a number (value is +0)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 9, length: +0 }; var obj = { 0: 9, length: +0 };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-3-5 es5id: 15.4.4.16-3-5
description: Array.prototype.every - value of 'length' is a number (value is -0) description: Array.prototype.every - value of 'length' is a number (value is -0)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 9, length: -0 }; var obj = { 0: 9, length: -0 };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-6
description: > description: >
Array.prototype.every - value of 'length' is a number (value is Array.prototype.every - value of 'length' is a number (value is
positive) positive)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; var obj = { 0: 12, 1: 11, 2: 9, length: 2 };
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
!Array.prototype.every.call(obj, callbackfn2); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-7
description: > description: >
Array.prototype.every - value of 'length' is a number (value is Array.prototype.every - value of 'length' is a number (value is
negative) negative)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn1(val, idx, obj) { function callbackfn1(val, idx, obj) {
return val > 10; return val > 10;
} }
@ -20,7 +18,5 @@ function testcase() {
var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 0 var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 0
return Array.prototype.every.call(obj, callbackfn1) && assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true');
Array.prototype.every.call(obj, callbackfn2); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-8
description: > description: >
Array.prototype.every - value of 'length' is a number (value is Array.prototype.every - value of 'length' is a number (value is
Infinity) Infinity)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 9, length: Infinity }; var obj = { 0: 9, length: Infinity };
return !Array.prototype.every.call(obj, callbackfn) && accessed; assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-9
description: > description: >
Array.prototype.every - value of 'length' is a number (value is Array.prototype.every - value of 'length' is a number (value is
-Infinity) -Infinity)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 9, length: -Infinity }; var obj = { 0: 9, length: -Infinity };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -4,15 +4,10 @@
/*--- /*---
es5id: 15.4.4.16-4-12 es5id: 15.4.4.16-4-12
description: Array.prototype.every - 'callbackfn' is a function description: Array.prototype.every - 'callbackfn' is a function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
return val > 10; return val > 10;
} }
return ![11, 9].every(callbackfn); assert.sameValue([11, 9].every(callbackfn), false, '[11, 9].every(callbackfn)');
}
runTestCase(testcase);

View File

@ -5,10 +5,8 @@
es5id: 15.4.4.16-5-1-s es5id: 15.4.4.16-5-1-s
description: Array.prototype.every - thisArg not passed to strict callbackfn description: Array.prototype.every - thisArg not passed to strict callbackfn
flags: [noStrict] flags: [noStrict]
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var innerThisCorrect = false; var innerThisCorrect = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +16,5 @@ function testcase() {
} }
[1].every(callbackfn); [1].every(callbackfn);
return innerThisCorrect;
} assert(innerThisCorrect, 'innerThisCorrect !== true');
runTestCase(testcase);

View File

@ -5,20 +5,14 @@
es5id: 15.4.4.16-5-1 es5id: 15.4.4.16-5-1
description: Array.prototype.every - thisArg not passed description: Array.prototype.every - thisArg not passed
flags: [noStrict] flags: [noStrict]
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) function callbackfn(val, idx, obj)
{ {
return this === fnGlobalObject(); return this === fnGlobalObject();
} }
var arr = [1]; var arr = [1];
if(arr.every(callbackfn) === true)
return true; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-10 es5id: 15.4.4.16-5-10
description: Array.prototype.every - Array Object can be used as thisArg description: Array.prototype.every - Array Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objArray = []; var objArray = [];
@ -19,6 +16,5 @@ function testcase() {
return [11].every(callbackfn, objArray) && accessed; assert([11].every(callbackfn, objArray), '[11].every(callbackfn, objArray) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-11 es5id: 15.4.4.16-5-11
description: Array.prototype.every - String Object can be used as thisArg description: Array.prototype.every - String Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objString = new String(); var objString = new String();
@ -19,6 +16,5 @@ function testcase() {
return [11].every(callbackfn, objString) && accessed; assert([11].every(callbackfn, objString), '[11].every(callbackfn, objString) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-12 es5id: 15.4.4.16-5-12
description: Array.prototype.every - Boolean Object can be used as thisArg description: Array.prototype.every - Boolean Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objBoolean = new Boolean(); var objBoolean = new Boolean();
@ -19,6 +16,5 @@ function testcase() {
return [11].every(callbackfn, objBoolean) && accessed; assert([11].every(callbackfn, objBoolean), '[11].every(callbackfn, objBoolean) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-13 es5id: 15.4.4.16-5-13
description: Array.prototype.every - Number Object can be used as thisArg description: Array.prototype.every - Number Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objNumber = new Number(); var objNumber = new Number();
@ -17,6 +14,5 @@ function testcase() {
return this === objNumber; return this === objNumber;
} }
return [11].every(callbackfn, objNumber) && accessed; assert([11].every(callbackfn, objNumber), '[11].every(callbackfn, objNumber) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-14 es5id: 15.4.4.16-5-14
description: Array.prototype.every - the Math object can be used as thisArg description: Array.prototype.every - the Math object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -16,6 +13,5 @@ function testcase() {
return this === Math; return this === Math;
} }
return [11].every(callbackfn, Math) && accessed; assert([11].every(callbackfn, Math), '[11].every(callbackfn, Math) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-15 es5id: 15.4.4.16-5-15
description: Array.prototype.every - Date Object can be used as thisArg description: Array.prototype.every - Date Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objDate = new Date(); var objDate = new Date();
@ -17,6 +14,5 @@ function testcase() {
return this === objDate; return this === objDate;
} }
return [11].every(callbackfn, objDate) && accessed; assert([11].every(callbackfn, objDate), '[11].every(callbackfn, objDate) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-16 es5id: 15.4.4.16-5-16
description: Array.prototype.every - RegExp Object can be used as thisArg description: Array.prototype.every - RegExp Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objRegExp = new RegExp(); var objRegExp = new RegExp();
@ -17,6 +14,5 @@ function testcase() {
return this === objRegExp; return this === objRegExp;
} }
return [11].every(callbackfn, objRegExp) && accessed; assert([11].every(callbackfn, objRegExp), '[11].every(callbackfn, objRegExp) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-17 es5id: 15.4.4.16-5-17
description: Array.prototype.every - the JSON object can be used as thisArg description: Array.prototype.every - the JSON object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -15,6 +13,5 @@ function testcase() {
return this === JSON; return this === JSON;
} }
return [11].every(callbackfn, JSON) && accessed; assert([11].every(callbackfn, JSON), '[11].every(callbackfn, JSON) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-18 es5id: 15.4.4.16-5-18
description: Array.prototype.every - Error Object can be used as thisArg description: Array.prototype.every - Error Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objError = new RangeError(); var objError = new RangeError();
@ -17,6 +14,5 @@ function testcase() {
return this === objError; return this === objError;
} }
return [11].every(callbackfn, objError) && accessed; assert([11].every(callbackfn, objError), '[11].every(callbackfn, objError) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-19 es5id: 15.4.4.16-5-19
description: Array.prototype.every - the Arguments object can be used as thisArg description: Array.prototype.every - the Arguments object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var arg; var arg;
@ -21,6 +18,5 @@ function testcase() {
arg = arguments; arg = arguments;
}(1, 2, 3)); }(1, 2, 3));
return [11].every(callbackfn, arg) && accessed; assert([11].every(callbackfn, arg), '[11].every(callbackfn, arg) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-2 es5id: 15.4.4.16-5-2
description: Array.prototype.every - thisArg is Object description: Array.prototype.every - thisArg is Object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var res = false; var res = false;
var o = new Object(); var o = new Object();
o.res = true; o.res = true;
@ -17,8 +15,5 @@ function testcase() {
} }
var arr = [1]; var arr = [1];
if(arr.every(callbackfn, o) === true)
return true;
} assert.sameValue(arr.every(callbackfn, o), true, 'arr.every(callbackfn, o)');
runTestCase(testcase);

View File

@ -4,13 +4,9 @@
/*--- /*---
es5id: 15.4.4.16-5-21 es5id: 15.4.4.16-5-21
description: Array.prototype.every - the global object can be used as thisArg description: Array.prototype.every - the global object can be used as thisArg
includes: includes: [fnGlobalObject.js]
- runTestCase.js
- fnGlobalObject.js
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +14,5 @@ function testcase() {
return this === fnGlobalObject(); return this === fnGlobalObject();
} }
return [11].every(callbackfn, fnGlobalObject()) && accessed; assert([11].every(callbackfn, fnGlobalObject()), '[11].every(callbackfn, fnGlobalObject()) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-22 es5id: 15.4.4.16-5-22
description: Array.prototype.every - boolean primitive can be used as thisArg description: Array.prototype.every - boolean primitive can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -16,6 +13,5 @@ function testcase() {
return this.valueOf() === false; return this.valueOf() === false;
} }
return [11].every(callbackfn, false) && accessed; assert([11].every(callbackfn, false), '[11].every(callbackfn, false) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-23 es5id: 15.4.4.16-5-23
description: Array.prototype.every - number primitive can be used as thisArg description: Array.prototype.every - number primitive can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -16,6 +13,5 @@ function testcase() {
return this.valueOf() === 101; return this.valueOf() === 101;
} }
return [11].every(callbackfn, 101) && accessed; assert([11].every(callbackfn, 101), '[11].every(callbackfn, 101) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-24 es5id: 15.4.4.16-5-24
description: Array.prototype.every - string primitive can be used as thisArg description: Array.prototype.every - string primitive can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -16,6 +13,5 @@ function testcase() {
return this.valueOf() === "abc"; return this.valueOf() === "abc";
} }
return [11].every(callbackfn, "abc") && accessed; assert([11].every(callbackfn, "abc"), '[11].every(callbackfn, "abc") !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-3 es5id: 15.4.4.16-5-3
description: Array.prototype.every - thisArg is Array description: Array.prototype.every - thisArg is Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var res = false; var res = false;
var a = new Array(); var a = new Array();
a.res = true; a.res = true;
@ -18,8 +16,4 @@ function testcase() {
var arr = [1]; var arr = [1];
if(arr.every(callbackfn, a) === true) assert.sameValue(arr.every(callbackfn, a), true, 'arr.every(callbackfn, a)');
return true;
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-5-4
description: > description: >
Array.prototype.every - thisArg is object from object Array.prototype.every - thisArg is object from object
template(prototype) template(prototype)
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var res = false; var res = false;
function callbackfn(val, idx, obj) function callbackfn(val, idx, obj)
{ {
@ -21,8 +19,4 @@ function testcase() {
var f = new foo(); var f = new foo();
var arr = [1]; var arr = [1];
if(arr.every(callbackfn,f) === true) assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)');
return true;
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-5 es5id: 15.4.4.16-5-5
description: Array.prototype.every - thisArg is object from object template description: Array.prototype.every - thisArg is object from object template
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var res = false; var res = false;
function callbackfn(val, idx, obj) function callbackfn(val, idx, obj)
{ {
@ -19,8 +17,4 @@ function testcase() {
f.res = true; f.res = true;
var arr = [1]; var arr = [1];
if(arr.every(callbackfn,f) === true) assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)');
return true;
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-6 es5id: 15.4.4.16-5-6
description: Array.prototype.every - thisArg is function description: Array.prototype.every - thisArg is function
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var res = false; var res = false;
function callbackfn(val, idx, obj) function callbackfn(val, idx, obj)
{ {
@ -18,8 +16,4 @@ function testcase() {
foo.res = true; foo.res = true;
var arr = [1]; var arr = [1];
if(arr.every(callbackfn,foo) === true) assert.sameValue(arr.every(callbackfn,foo), true, 'arr.every(callbackfn,foo)');
return true;
}
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-7 es5id: 15.4.4.16-5-7
description: Array.prototype.every - built-in functions can be used as thisArg description: Array.prototype.every - built-in functions can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -16,6 +13,5 @@ function testcase() {
return this === eval; return this === eval;
} }
return [11].every(callbackfn, eval) && accessed; assert([11].every(callbackfn, eval), '[11].every(callbackfn, eval) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-5-9 es5id: 15.4.4.16-5-9
description: Array.prototype.every - Function Object can be used as thisArg description: Array.prototype.every - Function Object can be used as thisArg
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
var objFunction = function () { }; var objFunction = function () { };
@ -17,6 +14,5 @@ function testcase() {
return this === objFunction; return this === objFunction;
} }
return [11].every(callbackfn, objFunction) && accessed; assert([11].every(callbackfn, objFunction), '[11].every(callbackfn, objFunction) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-1
description: > description: >
Array.prototype.every considers new elements added to array after Array.prototype.every considers new elements added to array after
the call the call
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var calledForThree = false; var calledForThree = false;
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
@ -25,6 +22,4 @@ function testcase() {
var res = arr.every(callbackfn); var res = arr.every(callbackfn);
return calledForThree; assert(calledForThree, 'calledForThree !== true');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-2
description: > description: >
Array.prototype.every considers new value of elements in array Array.prototype.every considers new value of elements in array
after the call after the call
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
arr[4] = 6; arr[4] = 6;
@ -22,8 +19,5 @@ function testcase() {
var arr = [1,2,3,4,5]; var arr = [1,2,3,4,5];
if(arr.every(callbackfn) === false)
return true; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-3
description: > description: >
Array.prototype.every doesn't visit deleted elements in array Array.prototype.every doesn't visit deleted elements in array
after the call after the call
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
delete arr[2]; delete arr[2];
@ -22,8 +19,5 @@ function testcase() {
var arr = [1,2,3,4,5]; var arr = [1,2,3,4,5];
if(arr.every(callbackfn) === true)
return true; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-4
description: > description: >
Array.prototype.every doesn't visit deleted elements when Array.prototype.every doesn't visit deleted elements when
Array.length is decreased Array.length is decreased
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
arr.length = 3; arr.length = 3;
@ -22,8 +19,5 @@ function testcase() {
var arr = [1,2,3,4,6]; var arr = [1,2,3,4,6];
if(arr.every(callbackfn) === true)
return true; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-5
description: > description: >
Array.prototype.every doesn't consider newly added elements in Array.prototype.every doesn't consider newly added elements in
sparse array sparse array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
arr[1000] = 3; arr[1000] = 3;
@ -24,8 +21,5 @@ function testcase() {
arr[1] = 1; arr[1] = 1;
arr[2] = 2; arr[2] = 2;
if(arr.every(callbackfn) === true)
return true; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-6
description: > description: >
Array.prototype.every visits deleted element in array after the Array.prototype.every visits deleted element in array after the
call when same index is also present in prototype call when same index is also present in prototype
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
delete arr[2]; delete arr[2];
@ -26,8 +23,4 @@ function testcase() {
var res = arr.every(callbackfn); var res = arr.every(callbackfn);
delete Array.prototype[2]; delete Array.prototype[2];
if(res === false) assert.sameValue(res, false, 'res');
return true;
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Array.prototype.every - Deleting the array itself within the Array.prototype.every - Deleting the array itself within the
callbackfn of Array.prototype.every is successful once callbackfn of Array.prototype.every is successful once
Array.prototype.every is called for all elements Array.prototype.every is called for all elements
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var o = new Object(); var o = new Object();
o.arr = [1, 2, 3, 4, 5]; o.arr = [1, 2, 3, 4, 5];
@ -22,6 +20,5 @@ function testcase() {
return false; return false;
} }
return o.arr.every(callbackfn) && !o.hasOwnProperty("arr"); assert(o.arr.every(callbackfn), 'o.arr.every(callbackfn) !== true');
} assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")');
runTestCase(testcase);

View File

@ -4,11 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-7-8 es5id: 15.4.4.16-7-8
description: Array.prototype.every - no observable effects occur if len is 0 description: Array.prototype.every - no observable effects occur if len is 0
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, 1: 12, length: 0 }; var obj = { 0: 11, 1: 12, length: 0 };
return Array.prototype.every.call(obj, callbackfn) && !accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(accessed, false, 'accessed');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-9
description: > description: >
Array.prototype.every - modifications to length don't change Array.prototype.every - modifications to length don't change
number of iterations number of iterations
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var called = 0; var called = 0;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -28,6 +25,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(obj, callbackfn) && 2 === called; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert.sameValue(called, 2, 'called');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-b-1
description: > description: >
Array.prototype.every - callbackfn not called for indexes never Array.prototype.every - callbackfn not called for indexes never
been assigned values been assigned values
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var callCnt = 0.; var callCnt = 0.;
function callbackfn(val, Idx, obj) function callbackfn(val, Idx, obj)
{ {
@ -21,7 +18,5 @@ function testcase() {
var arr = new Array(10); var arr = new Array(10);
arr[1] = undefined; arr[1] = undefined;
arr.every(callbackfn); arr.every(callbackfn);
if( callCnt === 1)
return true; assert.sameValue(callCnt, 1, 'callCnt');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-14
description: > description: >
Array.prototype.every - decreasing length of array causes index Array.prototype.every - decreasing length of array causes index
property not to be visited property not to be visited
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -25,6 +23,5 @@ function testcase() {
configurable: true configurable: true
}); });
return arr.every(callbackfn) && accessed; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Array.prototype.every - decreasing length of array does not delete Array.prototype.every - decreasing length of array does not delete
non-configurable properties non-configurable properties
flags: [noStrict] flags: [noStrict]
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 2 && val === "unconfigurable") { if (idx === 2 && val === "unconfigurable") {
return false; return false;
@ -36,6 +34,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !arr.every(callbackfn); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -4,10 +4,8 @@
/*--- /*---
es5id: 15.4.4.16-7-b-2 es5id: 15.4.4.16-7-b-2
description: Array.prototype.every - added properties in step 2 are visible here description: Array.prototype.every - added properties in step 2 are visible here
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 2 && val === "length") { if (idx === 2 && val === "length") {
return false; return false;
@ -26,6 +24,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !Array.prototype.every.call(arr, callbackfn); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-3
description: > description: >
Array.prototype.every - deleted properties in step 2 are visible Array.prototype.every - deleted properties in step 2 are visible
here here
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -25,6 +23,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(arr, callbackfn) && accessed; assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-b-4
description: > description: >
Array.prototype.every - properties added into own object after Array.prototype.every - properties added into own object after
current position are visited on an Array-like object current position are visited on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 1 && val === 1) { if (idx === 1 && val === 1) {
return false; return false;
@ -34,6 +31,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !Array.prototype.every.call(arr, callbackfn); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-5
description: > description: >
Array.prototype.every - properties added into own object after Array.prototype.every - properties added into own object after
current position are visited on an Array current position are visited on an Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 1 && val === 1) { if (idx === 1 && val === 1) {
return false; return false;
@ -33,6 +31,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !arr.every(callbackfn); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-8
description: > description: >
Array.prototype.every - deleting own property causes index Array.prototype.every - deleting own property causes index
property not to be visited on an Array-like object property not to be visited on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -32,6 +30,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(obj, callbackfn) && accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-9
description: > description: >
Array.prototype.every - deleting own property causes index Array.prototype.every - deleting own property causes index
property not to be visited on an Array property not to be visited on an Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
accessed = true; accessed = true;
@ -32,6 +30,5 @@ function testcase() {
configurable: true configurable: true
}); });
return arr.every(callbackfn) && accessed; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-1
description: > description: >
Array.prototype.every - element to be retrieved is own data Array.prototype.every - element to be retrieved is own data
property on an Array-like object property on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var kValue = { }; var kValue = { };
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 5) { if (idx === 5) {
@ -22,6 +19,4 @@ function testcase() {
var obj = { 5: kValue, length: 100 }; var obj = { 5: kValue, length: 100 };
return !Array.prototype.every.call(obj, callbackfn); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-10
description: > description: >
Array.prototype.every - element to be retrieved is own accessor Array.prototype.every - element to be retrieved is own accessor
property on an Array property on an Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 2) { if (idx === 2) {
return val !== 12; return val !== 12;
@ -28,6 +25,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !arr.every(callbackfn); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)');
}
runTestCase(testcase);

View File

@ -7,11 +7,8 @@ description: >
Array.prototype.every - element to be retrieved is own accessor Array.prototype.every - element to be retrieved is own accessor
property that overrides an inherited data property on an property that overrides an inherited data property on an
Array-like object Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 0) { if (idx === 0) {
return val === 5; return val === 5;
@ -35,6 +32,4 @@ function testcase() {
configurable: true configurable: true
}); });
return !Array.prototype.every.call(child, callbackfn); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)');
}
runTestCase(testcase);

View File

@ -7,10 +7,8 @@ description: >
Array.prototype.every - element to be retrieved is own accessor Array.prototype.every - element to be retrieved is own accessor
property that overrides an inherited accessor property on an property that overrides an inherited accessor property on an
Array-like object Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 1) { if (idx === 1) {
return val === 6; return val === 6;
@ -42,6 +40,4 @@ function testcase() {
}); });
return !Array.prototype.every.call(child, callbackfn); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-15
description: > description: >
Array.prototype.every - element to be retrieved is inherited Array.prototype.every - element to be retrieved is inherited
accessor property on an Array-like object accessor property on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
if (idx === 1) { if (idx === 1) {
return val !== 11; return val !== 11;
@ -34,6 +31,4 @@ function testcase() {
var child = new Con(); var child = new Con();
child.length = 20; child.length = 20;
return !Array.prototype.every.call(child, callbackfn); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)');
}
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-17
description: > description: >
Array.prototype.every - element to be retrieved is own accessor Array.prototype.every - element to be retrieved is own accessor
property without a get function on an Array-like object property without a get function on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -24,6 +21,5 @@ function testcase() {
configurable: true configurable: true
}); });
return Array.prototype.every.call(obj, callbackfn) && accessed; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-18
description: > description: >
Array.prototype.every - element to be retrieved is own accessor Array.prototype.every - element to be retrieved is own accessor
property without a get function on an Array property without a get function on an Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -25,6 +22,5 @@ function testcase() {
configurable: true configurable: true
}); });
return arr.every(callbackfn) && accessed; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-2
description: > description: >
Array.prototype.every - element to be retrieved is own data Array.prototype.every - element to be retrieved is own data
property on an Array property on an Array
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var called = 0; var called = 0;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -18,6 +15,5 @@ function testcase() {
return val === 11; return val === 11;
} }
return [11].every(callbackfn) && 1 === called; assert([11].every(callbackfn), '[11].every(callbackfn) !== true');
} assert.sameValue(called, 1, 'called');
runTestCase(testcase);

View File

@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-21
description: > description: >
Array.prototype.every - element to be retrieved is inherited Array.prototype.every - element to be retrieved is inherited
accessor property without a get function on an Array-like object accessor property without a get function on an Array-like object
includes: [runTestCase.js]
---*/ ---*/
function testcase() {
var accessed = false; var accessed = false;
function callbackfn(val, idx, obj) { function callbackfn(val, idx, obj) {
@ -30,6 +27,5 @@ function testcase() {
var child = new Con(); var child = new Con();
child.length = 2; child.length = 2;
return Array.prototype.every.call(child, callbackfn) && accessed; assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true');
} assert(accessed, 'accessed !== true');
runTestCase(testcase);

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