Lines Matching refs:O
80 var O = { variable
95 assertEquals(O, O.returnThis(..."test"));
96 assertEquals(O, O["returnThis"](..."test"));
97 assertEquals(O.nested, O.nested.returnThis(..."test"));
98 assertEquals(O.nested, O.nested["returnThis"](..."test"));
101 assertEquals(0, O.countArgs(...""));
102 assertEquals(4, O.countArgs(..."test"));
103 assertEquals(4, O.countArgs(..."tes", ..."t"));
104 assertEquals(4, O.countArgs("t", ..."es", "t"));
105 assertEquals(4, O.countArgs("tes", ..."t!!"));
107 assertEquals(1, O.countArgs(...[1]));
108 assertEquals(2, O.countArgs(...[1, 2]));
109 assertEquals(3, O.countArgs(...[1, 2, 3]));
110 assertEquals(4, O.countArgs(...[1, 2, 3, 4]));
111 assertEquals(5, O.countArgs(...[1, 2, 3, 4, 5]));
112 assertEquals(6, O.countArgs(...[1, 2, 3, 4, 5, 6]));
114 assertEquals(1, O.countArgs(...new Set([1])));
115 assertEquals(2, O.countArgs(...new Set([1, 2])));
116 assertEquals(3, O.countArgs(...new Set([1, 2, 3])));
117 assertEquals(4, O.countArgs(...new Set([1, 2, 3, 4])));
118 assertEquals(5, O.countArgs(...new Set([1, 2, 3, 4, 5])));
119 assertEquals(6, O.countArgs(...new Set([1, 2, 3, 4, 5, 6])));
121 assertEquals(3, O.countArgs(
125 assertEquals(void 0, O.sum(...""));
126 assertEquals(void 0, O.sum(...[]));
127 assertEquals(void 0, O.sum(...new Set));
128 assertEquals(void 0, O.sum(...(function*() { })()));
130 assertEquals("test", O.sum(..."test"));
131 assertEquals(10, O.sum(...[1, 2, 3, 4]));
132 assertEquals(10, O.sum(...[1, 2, 3], 4));
133 assertEquals(10, O.sum(1, ...[2, 3], 4));
134 assertEquals(10, O.sum(1, ...[2, 3], ...[4]));
135 assertEquals(10, O.sum(1, 2, ...[3, 4]));
136 assertEquals(10, O.sum(...new Set([1, 2, 3, 4])));
137 assertEquals(10, O.sum(...(function*() {
145 assertEquals(10, O.sum(...O.makeArray(...[1, 2, 3, 4])));
146 assertEquals("test!!!", O.sum(...O.makeArray(..."test!!!")));
149 assertEquals(36, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8));
150 assertEquals(45, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8, ...[9]));
232 var O = { variable
247 assertEquals(O, O.returnThis(..."test"));
248 assertEquals(O, O["returnThis"](..."test"));
249 assertEquals(O.nested, O.nested.returnThis(..."test"));
250 assertEquals(O.nested, O.nested["returnThis"](..."test"));
253 assertEquals(0, O.countArgs(...""));
254 assertEquals(4, O.countArgs(..."test"));
255 assertEquals(4, O.countArgs(..."tes", ..."t"));
256 assertEquals(4, O.countArgs("t", ..."es", "t"));
257 assertEquals(4, O.countArgs("tes", ..."t!!"));
259 assertEquals(1, O.countArgs(...[1]));
260 assertEquals(2, O.countArgs(...[1, 2]));
261 assertEquals(3, O.countArgs(...[1, 2, 3]));
262 assertEquals(4, O.countArgs(...[1, 2, 3, 4]));
263 assertEquals(5, O.countArgs(...[1, 2, 3, 4, 5]));
264 assertEquals(6, O.countArgs(...[1, 2, 3, 4, 5, 6]));
266 assertEquals(1, O.countArgs(...new Set([1])));
267 assertEquals(2, O.countArgs(...new Set([1, 2])));
268 assertEquals(3, O.countArgs(...new Set([1, 2, 3])));
269 assertEquals(4, O.countArgs(...new Set([1, 2, 3, 4])));
270 assertEquals(5, O.countArgs(...new Set([1, 2, 3, 4, 5])));
271 assertEquals(6, O.countArgs(...new Set([1, 2, 3, 4, 5, 6])));
273 assertEquals(3, O.countArgs(...(function*(){
280 assertEquals(void 0, O.sum(...""));
281 assertEquals(void 0, O.sum(...[]));
282 assertEquals(void 0, O.sum(...new Set));
283 assertEquals(void 0, O.sum(...(function*() { })()));
285 assertEquals("test", O.sum(..."test"));
286 assertEquals(10, O.sum(...[1, 2, 3, 4]));
287 assertEquals(10, O.sum(...[1, 2, 3], 4));
288 assertEquals(10, O.sum(1, ...[2, 3], 4));
289 assertEquals(10, O.sum(1, ...[2, 3], ...[4]));
290 assertEquals(10, O.sum(1, 2, ...[3, 4]));
291 assertEquals(10, O.sum(...new Set([1, 2, 3, 4])));
292 assertEquals(10, O.sum(...(function*() {
300 assertEquals(10, O.sum(...O.makeArray(...[1, 2, 3, 4])));
301 assertEquals("test!!!", O.sum(...O.makeArray(..."test!!!")));
304 assertEquals(36, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8));
305 assertEquals(45, O.sum(0, ...[1], 2, 3, ...[4, 5], 6, 7, 8, ...[9]));