blob: ef54c095fec6fcc004e2c82aa013792ce36d01a4 [file] [log] [blame]
== Running test suite: ArrayUtilities
-- Running test case: Array.prototype.lowerBound
PASS: lowerBound of a value before the first value should produce the first index.
PASS: lowerBound of a value in the list should return the value's index.
PASS: lowerBound of a value in the list should return the value's index.
PASS: lowerBound of a value in the list should return the value's index.
PASS: lowerBound of a duplicate value in the list should return the value's first index.
PASS: lowerBound of a value in a gap in the list should return the index where the value would be.
PASS: lowerBound of a value after the last value should produce the index after the last index (length).
PASS: lowerBound with a comparator should invoke the comparator with the search value and a value in the list.
-- Running test case: Array.prototype.upperBound
PASS: upperBound of a value before the first value should produce the first index.
PASS: upperBound of a value in the list should return the next index after the value.
PASS: upperBound of a value in the list should return the next index after the value.
PASS: upperBound of a value in the list should return the next index after the value.
PASS: upperBound of a duplicate value in the list should return the next index after the value's last index.
PASS: upperBound of a value in a gap in the list should return the index where the value would be.
PASS: upperBound of a value after the last value should produce the index after the last index (length).
PASS: upperBound with a comparator should invoke the comparator with the search value and a value in the list.
-- Running test case: Array.prototype.binaryIndexOf
PASS: binaryIndexOf of a value not in the list should be -1.
PASS: binaryIndexOf of a value not in the list should be -1.
PASS: binaryIndexOf of a value in the list should return the index of the value.
PASS: binaryIndexOf of a duplicate value in the list should return the first index of the value.
-- Running test case: Array.prototype.partition
PASS: partition should not lose any elements.
PASS: partition should keep the order of elements in the sublists.
PASS: partition should handle duplicates.
PASS: partition should produce an empty list for the negative side.
PASS: partition should produce an empty list for the positive side.
-- Running test case: Array.isTypedArray
PASS: isTypedArray of non-array.
PASS: isTypedArray of non-typed-array should be false.
PASS: isTypedArray of Int8Array should be true.
PASS: isTypedArray of Int16Array should be true.
PASS: isTypedArray of Int32Array should be true.
PASS: isTypedArray of Uint8Array should be true.
PASS: isTypedArray of Uint8ClampedArray should be true.
PASS: isTypedArray of Uint16Array should be true.
PASS: isTypedArray of Uint32Array should be true.
PASS: isTypedArray of Float32Array should be true.
PASS: isTypedArray of Float64Array should be true.
-- Running test case: Array.shallowEqual
PASS: shallowEqual of empty arrays should be true.
PASS: shallowEqual of an array with itself should be true.
PASS: shallowEqual of equal arrays should be true.
PASS: shallowEqual of equal arrays should be true.
PASS: shallowEqual of unequal arrays should be false.
PASS: shallowEqual of unequal arrays should be false.
PASS: shallowEqual of an array and null should be false.
PASS: shallowEqual of an array and non-array should be false.
PASS: shallowEqual of a typed-array and it's array counterpart should be true.
PASS: shallowEqual of a typed-array with itself should be true.
PASS: shallowEqual of equal typed-array and it's array counterpart should be true.
PASS: shallowEqual of equal typed-arrays should be true.
PASS: shallowEqual of equal typed-array and it's array counterpart should be true.
PASS: shallowEqual of equal typed-arrays should be true.
PASS: shallowEqual of unequal typed-array and it's array counterpart should be false.
PASS: shallowEqual of unequal typed-arrays should be false.
PASS: shallowEqual of unequal typed-array and it's array counterpart should be false.
PASS: shallowEqual of unequal typed-arrays should be false.
PASS: shallowEqual of a typed-array and null should be false.
PASS: shallowEqual of a typed-array and non-array should be false.
PASS: shallowEqual of a non-array with itself should be false.
PASS: shallowEqual of non-arrays should be false.
-- Running test case: Array.diffArrays
["a"], [] => [["a",-1]]
[], ["a"] => [["a",1]]
["a"], ["b"] => [["a",-1],["b",1]]
["a"], ["a"] => [["a",0]]
["a"], ["a","b"] => [["a",0],["b",1]]
["a"], ["b","a"] => [["b",1],["a",0]]
["a","b"], ["a"] => [["a",0],["b",-1]]
["b","a"], ["a"] => [["b",-1],["a",0]]
["b","a"], ["a","c"] => [["b",-1],["a",0],["c",1]]
["b","a"], ["a","c"] => [["b",-1],["a",0],["c",1]]
["b","a"], ["a","b"] => [["a",1],["b",0],["a",-1]]
["a","b","c"], ["a","d","c"] => [["a",0],["b",-1],["d",1],["c",0]]
["a","b","c"], ["c","b","a"] => [["c",1],["b",1],["a",0],["b",-1],["c",-1]]
Repeating items:
["a"], ["a","a"] => [["a",0],["a",1]]
["a","a"], ["a"] => [["a",0],["a",-1]]
["a","a"], ["a","a"] => [["a",0],["a",0]]
["b","a","b"], ["a","b","a"] => [["a",1],["b",0],["a",0],["b",-1]]
["a","b","b","c"], ["c","b","b","b","a"] => [["a",-1],["c",1],["b",0],["b",0],["c",-1],["b",1],["a",1]]
["a","b","b","b","c"], ["c","b","b","a"] => [["a",-1],["c",1],["b",0],["b",0],["b",-1],["c",-1],["a",1]]
["a","a","b","b","c","c"], ["b","b","c","c","a","a"] => [["a",-1],["a",-1],["b",0],["b",0],["c",0],["c",0],["a",1],["a",1]]
-- Running test case: Array.prototype.lastValue
PASS: lastValue of a nonempty array should be the last value.
PASS: lastValue of an empty array should be undefined.
-- Running test case: Array.prototype.adjacencies
[] => []
[1] => []
[1,2] => [[1,2]]
[1,2,3] => [[1,2],[2,3]]
[1,2,3,4] => [[1,2],[2,3],[3,4]]
-- Running test case: Array.prototype.remove
PASS: remove should return true when removing a value that exists.
PASS: remove should only remove the first matching value.
PASS: remove should return true when removing a value that exists.
PASS: remove should return false when removing a value that does not exist.
PASS: remove should only remove values that strictly match.
PASS: remove should return false when removing a value that does not exist.
PASS: remove should return false when removing a value that does not exist.
PASS: remove should not affect the array if the value does not exist.
-- Running test case: Array.prototype.removeAll
PASS: removeAll should remove all matching values.
PASS: removeAll should only remove values that strictly match.
-- Running test case: Array.prototype.toggleIncludes
PASS: toggleIncludes of an existing item with force true should have no effect.
PASS: toggleIncludes of an existing item with force false should remove the item.
PASS: toggleIncludes of a nonexistent item with force true should add the item.
PASS: toggleIncludes of a nonexistent item with force false should have no effect.
-- Running test case: Array.prototype.insertAtIndex
PASS: insertAtIndex with index unspecified should insert at the beginning.
PASS: insertAtIndex with index zero should insert at the beginning.
PASS: insertAtIndex with 0 < index < length should insert at the correct location.
PASS: insertAtIndex with negative index should insert from the end.
PASS: insertAtIndex with index greater than array length should insert at the end.
-- Running test case: Array.prototype.pushAll
Array:
[1,2] => [1,2,"a1","a2"]
Set:
[1,2] => [1,2,"s1","s2"]
[1,2] => [1,2,["s1","s1"],["s2","s2"]]
[1,2] => [1,2,"s1","s2"]
[1,2] => [1,2,"s1","s2"]
Map:
[1,2] => [1,2,["m1k","m1v"],["m2k","m2v"]]
[1,2] => [1,2,["m1k","m1v"],["m2k","m2v"]]
[1,2] => [1,2,"m1k","m2k"]
[1,2] => [1,2,"m1v","m2v"]
Object:
[1,2] => [1,2,["o1k","o1v"],["o2k","o2v"]]
[1,2] => [1,2,"o1k","o2k"]
[1,2] => [1,2,"o1v","o2v"]
Generator:
[1,2] => [1,2,"g1","g2"]
Node:
[1,2] => [1,2,<n1>,<n2>]
[1,2] => [1,2,<n1>,<n2>]
Object (doesn't have [Symbol.iterator]):
PASS: Should produce an exception.
TypeError: undefined is not a function (near '...item of iterable...')