Home | History | Annotate | Download | only in webkit

Lines Matching refs:toObject

28 function toObject(array) {
52 shouldBe("toObject([0,1,2,3]).reduceRight(function(a,b){ return a + b; })", "6");
53 shouldBe("toObject([1,2,3]).reduceRight(function(a,b){ return a + b; })", "6");
54 shouldBe("toObject([0,1,2,3]).reduceRight(function(a,b){ return a + b; }, 4)", "10");
55 shouldBe("toObject([1,2,3]).reduceRight(function(a,b){ return a + b; }, 4)", "10");
63 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ return a + b; }, 0)", "10");
67 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ callCount++; }); callCount", "0");
71 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ callCount++; }, 0); callCount", "1");
83 shouldBe("toObject([1, 2, 3, 4]).reduceRight(function(a,b, i, thisObj){ thisObj.length--; callCount++; return a + b; }, 0); callCount", "4");
85 shouldBe("toObject([1, 2, 3, 4]).reduceRight(function(a,b, i, thisObj){ thisObj.length++; callCount++; return a + b; }, 0); callCount", "4");
88 shouldBe("toObject([[0,1], [2,3], [4,5]]).reduceRight(function(a,b) {return a.concat(b);}, [])", "[4,5,2,3,0,1]");
89 shouldBe("toObject([0,1,2,3,4,5]).reduceRight(function(a,b,i) {return a.concat([i,b]);}, [])", "[5,5,4,4,3,3,2,2,1,1,0,0]");