Lines Matching full:shouldbe
48 shouldBe("[0,1,2,3].reduceRight(function(a,b){ return a + b; })", "6");
49 shouldBe("[1,2,3].reduceRight(function(a,b){ return a + b; })", "6");
50 shouldBe("[0,1,2,3].reduceRight(function(a,b){ return a + b; }, 4)", "10");
51 shouldBe("[1,2,3].reduceRight(function(a,b){ return a + b; }, 4)", "10");
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");
56 shouldBe("toUnorderedObject([0,1,2,3]).reduceRight(function(a,b){ return a + b; })", "6");
57 shouldBe("toUnorderedObject([1,2,3]).reduceRight(function(a,b){ return a + b; })", "6");
58 shouldBe("toUnorderedObject([0,1,2,3]).reduceRight(function(a,b){ return a + b; }, 4)", "10");
59 shouldBe("toUnorderedObject([1,2,3]).reduceRight(function(a,b){ return a + b; }, 4)", "10");
62 shouldBe("sparseArray.reduceRight(function(a,b){ return a + b; }, 0)", "10");
63 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ return a + b; }, 0)", "10");
65 shouldBe("sparseArray.reduceRight(function(a,b){ callCount++; }); callCount", "0");
67 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ callCount++; }); callCount", "0");
69 shouldBe("sparseArray.reduceRight(function(a,b){ callCount++; }, 0); callCount", "1");
71 shouldBe("toObject(sparseArray).reduceRight(function(a,b){ callCount++; }, 0); callCount", "1");
73 shouldBe("[0,1,2,3,4].reduceRight(function(a,b){ callCount++; }, 0); callCount", "5");
75 shouldBe("[0,1,2,3,4].reduceRight(function(a,b){ callCount++; }); callCount", "4");
77 shouldBe("[1, 2, 3, 4].reduceRight(function(a,b, i, thisObj){ thisObj.length--; callCount++; return a + b; }, 0); callCount", "4");
79 shouldBe("[1, 2, 3, 4].reduceRight(function(a,b, i, thisObj){ thisObj.length = 1; callCount++; return a + b; }, 0); callCount", "2");
81 shouldBe("[1, 2, 3, 4].reduceRight(function(a,b, i, thisObj){ thisObj.length++; callCount++; return a + b; }, 0); callCount", "4");
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");
87 shouldBe("[[0,1], [2,3], [4,5]].reduceRight(function(a,b) {return a.concat(b);}, [])", "[4,5,2,3,0,1]");
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]");
90 shouldBe("toUnorderedObject([[0,1], [2,3], [4,5]]).reduceRight(function(a,b) {return a.concat(b);}, [])", "[4,5,2,3,0,1]");
91 shouldBe("toUnorderedObject([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]");
92 shouldBe("[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]");
93 shouldBe("[2,3].reduceRight(function() {'use strict'; return this;})", "undefined");