Home | History | Annotate | Download | only in es6

Lines Matching refs:function

33 function f() { }
34 function* g() { yield 1; }
39 // A generator function should have the same set of properties as any
40 // other function.
41 function TestGeneratorFunctionInstance() {
60 assertTrue(g_desc.get instanceof Function, prop);
72 // themselves and Function.prototype.
73 function TestGeneratorFunctionPrototype() {
75 assertSame(Object.getPrototypeOf(f), Function.prototype);
76 assertFalse(GeneratorFunctionPrototype === Function.prototype);
77 assertSame(Function.prototype,
80 Object.getPrototypeOf(function* () {}));
87 function TestGeneratorObjectPrototype() {
91 Object.getPrototypeOf((function*(){yield 1}).prototype));
109 // The generator object's "iterator" function is just the identity.
116 // like "Function".
117 function TestGeneratorFunction() {
121 assertSame(Function, Object.getPrototypeOf(GeneratorFunction));
122 assertTrue(g instanceof Function);
124 assertEquals("function* g() { yield 1; }", g.toString());
127 assertTrue(f instanceof Function); // Sanity check.
136 function TestPerGeneratorPrototype() {
137 assertTrue((function*(){}).prototype !== (function*(){}).prototype);
138 assertTrue((function*(){}).prototype !== g.prototype);
141 assertTrue(!(g.prototype instanceof Function));