Lines Matching refs:function
34 function TestContextAllocation() {
35 function* g1(a, b, c) { yield 1; return [a, b, c]; }
36 function* g2() { yield 1; return arguments; }
37 function* g3() { yield 1; return this; }
38 function* g4() { var x = 10; yield 1; return x; }
40 function* g5(l) { "use strict"; yield 1; for (let x in l) { yield x; } }
52 function TestGeneratorObject() {
53 function* g() { yield 1; }
76 function TestGeneratorObjectMethods() {
77 function* g() { yield 1; }
80 function TestNonGenerator(non_generator) {
81 assertThrows(function() { iter.next.call(non_generator); }, TypeError);
82 assertThrows(function() { iter.next.call(non_generator, 1); }, TypeError);
83 assertThrows(function() { iter.throw.call(non_generator, 1); }, TypeError);
84 assertThrows(function() { iter.close.call(non_generator); }, TypeError);
89 TestNonGenerator(function(){});