Lines Matching full:function
40 describe("HoistTest", function () {
43 it('case 1;', function () {
58 it('case 2', function () {
81 // case 3: hoist function declaration in global scope
82 it('case 3', function () {
84 snippetCompiler.compile(`function a() {};`);
85 IRNode.pg = new PandaGen("foo", creatAstFromSnippet(`function a() {};`), 0, undefined);
96 …// case 4: In case that two function declared directly in global scope with the same name, hoist t…
97 it('case 4', function () {
99 snippetCompiler.compile(`function a() {}; function a() {}`);
100 …IRNode.pg = new PandaGen("foo", creatAstFromSnippet(`function a() {}; function a() {}`), 0, undefi…
112 …// case 5: hoisting of function declaration is of higher priority than var declared variables with…
113 it('case 5', function () {
115 snippetCompiler.compile(`var a = 1; function a() {}`);
116 … IRNode.pg = new PandaGen("foo", creatAstFromSnippet(`var a = 1; function a() {}`), 0, undefined);
130 // case 6: hoist var declared variable in function scope
131 it('case 6', function () {
133 snippetCompiler.compile(`function a() {var a = 1;}`);
134 … IRNode.pg = new PandaGen("foo", creatAstFromSnippet(`function a() {var a = 1;}`), 0, undefined);
150 // case 7: hoist function declaration in function scope
151 it('case 7', function () {
153 snippetCompiler.compile(`function a() {function b() {}};`);
154 …IRNode.pg = new PandaGen("foo", creatAstFromSnippet(`function a() {function b() {}};`), 0, undefin…
169 it('case 8', function () {
185 // case 9: temporary dead zone of let in function scope
186 it('case 9', function () {
188 snippetCompiler.compile(`function b() {
206 it('case 10', function () {