Lines Matching refs:apply
36 assertSame(this, f0.apply(), "1-0");
38 assertSame(this, f0.apply(this), "2a");
39 assertSame(this, f0.apply(this, new Array(1)), "2b");
40 assertSame(this, f0.apply(this, new Array(2)), "2c");
41 assertSame(this, f0.apply(this, new Array(4242)), "2d");
43 assertSame(this, f0.apply(null), "3a");
44 assertSame(this, f0.apply(null, new Array(1)), "3b");
45 assertSame(this, f0.apply(null, new Array(2)), "3c");
46 assertSame(this, f0.apply(this, new Array(4242)), "3d");
48 assertSame(this, f0.apply(void 0), "4a");
49 assertSame(this, f0.apply(void 0, new Array(1)), "4b");
50 assertSame(this, f0.apply(void 0, new Array(2)), "4c");
52 assertEquals(void 0, f1.apply(), "1-1");
54 assertEquals(void 0, f1.apply(this), "5a");
55 assertEquals(void 0, f1.apply(this, new Array(1)), "5b");
56 assertEquals(void 0, f1.apply(this, new Array(2)), "5c");
57 assertEquals(void 0, f1.apply(this, new Array(4242)), "5d");
58 assertEquals(42, f1.apply(this, new Array(42, 43)), "5e");
59 assertEquals("foo", f1.apply(this, new Array("foo", "bar", "baz", "bo")), "5f");
61 assertEquals(void 0, f1.apply(null), "6a");
62 assertEquals(void 0, f1.apply(null, new Array(1)), "6b");
63 assertEquals(void 0, f1.apply(null, new Array(2)), "6c");
64 assertEquals(void 0, f1.apply(null, new Array(4242)), "6d");
65 assertEquals(42, f1.apply(null, new Array(42, 43)), "6e");
66 assertEquals("foo", f1.apply(null, new Array("foo", "bar", "baz", "bo")), "6f");
68 assertEquals(void 0, f1.apply(void 0), "7a");
69 assertEquals(void 0, f1.apply(void 0, new Array(1)), "7b");
70 assertEquals(void 0, f1.apply(void 0, new Array(2)), "7c");
71 assertEquals(void 0, f1.apply(void 0, new Array(4242)), "7d");
72 assertEquals(42, f1.apply(void 0, new Array(42, 43)), "7e");
73 assertEquals("foo", f1.apply(void 0, new Array("foo", "bar", "ba", "b")), "7f");
84 assertEquals(expect, j.apply(undefined, arr), "apply to undefined");
86 assertThrows("f0.apply(this, 1);");
87 assertThrows("f0.apply(this, 1, 2);");
88 assertThrows("f0.apply(this, 1, new Array(2));");
98 assertEquals("42foofishhorse", f.apply(this, arr), "apply to this");
108 assertEquals("bar42foofishhorse", s.apply("bar", arr), "apply to string");
119 assertEquals(42 + j, al.apply(345, a));
127 al.apply(345, a);
128 assertUnreachable("Apply of array with length " + a.length +
161 var same_primes = Array.prototype.constructor.apply(Array, primes);
174 assertEquals("morseper", String.prototype.concat.apply("", holey),
176 assertEquals("morseper", String.prototype.concat.apply("", holey, 1),
178 assertEquals("morseper", String.prototype.concat.apply("", holey, 1, 2),
180 assertEquals("morseper", String.prototype.concat.apply("", holey, 1, 2, 3),
182 assertEquals("morseper", String.prototype.concat.apply("", holey, 1, 2, 3, 4),
187 assertThrows("String.prototype.concat.apply.apply('foo', primes)");
189 String.prototype.concat.apply.apply(String.prototype.concat, primes),
195 assertSame(this, f0.apply(this, {}), "non-array-1");
196 assertSame(this, f0.apply(this, { length:1 }), "non-array-2");
197 assertEquals(void 0, f1.apply(this, { length:1 }), "non-array-3");
198 assertEquals(void 0, f1.apply(this, { 0:"foo" }), "non-array-4");
199 assertEquals("foo", f1.apply(this, { length:1, 0:"foo" }), "non-array-5");