forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharray-every-expected.txt
61 lines (44 loc) · 2.68 KB
/
array-every-expected.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
This test checks the behavior of the every() method on Array objects.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Array.prototype.every.length is 1
PASS Array.prototype.every.name is 'every'
1.0 Single Argument Testing
PASS [12, 5, 8, 130, 44].every(isBigEnough) is false
PASS [12, 54, 18, 130, 44].every(isBigEnough) is true
2.0 Two Argument Testing
PASS [12, 5, 10, 130, 44].every(isBigEnough, predicate) is false
PASS [12, 54, 18, 130, 44].every(isBigEnough, predicate) is true
3.0 Array Mutation Tests
3.1 Array Element Removal
PASS [12, 5, 8, 130, 44].every(isBigEnoughAndPop) is false
PASS [12, 54, 18, 130, 44].every(isBigEnoughAndPop) is true
3.2 Array Element Changing
PASS [12, 5, 8, 130, 44].every(isBigEnoughAndChange) is false
PASS [12, 54, 18, 130, 44].every(isBigEnoughAndChange) is false
3.3 Array Element Addition
PASS [12, 5, 8, 130, 44].every(isBigEnoughAndPush) is false
PASS [12, 54, 18, 130, 44].every(isBigEnoughAndPush) is false
4.0 Exception Test
PASS [12, 5, 8, 130, 44].every(isBigEnoughAndException) threw exception exception from function.
PASS [12, 54, 18, 130, 44].every(isBigEnoughAndException) threw exception exception from function.
5.0 Wrong Type for Callback Test
PASS [12, 5, 8, 130, 44].every(5) threw exception TypeError: Array.prototype.every callback must be a function.
PASS [12, 5, 8, 130, 44].every('wrong') threw exception TypeError: Array.prototype.every callback must be a function.
PASS [12, 5, 8, 130, 44].every(new Object()) threw exception TypeError: Array.prototype.every callback must be a function.
PASS [12, 5, 8, 130, 44].every(null) threw exception TypeError: Array.prototype.every callback must be a function.
PASS [12, 5, 8, 130, 44].every(undefined) threw exception TypeError: Array.prototype.every callback must be a function.
PASS [12, 5, 8, 130, 44].every() threw exception TypeError: Array.prototype.every callback must be a function.
6.0 Early Exit ("Short Circuiting")
PASS [12, 5, 8, 130, 44].every(isBigEnoughShortCircuit) is false
PASS accumulator.toString() is [12, 5].toString()
PASS [12, 54, 18, 130, 44].every(isBigEnoughShortCircuit) is true
PASS accumulator.toString() is [12, 54, 18, 130, 44].toString()
7.0 Behavior for Holes in Arrays
PASS arr.every(isNotUndefined) is true
PASS arr.every(isNotUndefined) is true
8.0 Array-like object with invalid lengths
PASS var obj = { 0: 1, 1: 2, 2: 3, length: 0 }; Array.prototype.every.call(obj, throwError) is true
PASS var obj = { 0: 1, 1: 2, 2: 3, length: -0 }; Array.prototype.every.call(obj, throwError) is true
PASS var obj = { 0: 1, 1: 2, 2: 3, length: -3 }; Array.prototype.every.call(obj, throwError) is true
PASS successfullyParsed is true
TEST COMPLETE