Home | History | Annotate | Download | only in js

Lines Matching refs:function

27 function testThis() {
31 function testThisDotAccess() {
35 function testThisBracketAccess(prop) {
39 function testGlobalAccess() {
42 function shouldBeSyntaxError(str) {
44 shouldThrow("(function(){" + str + "})");
46 function testLineContinuation() {
51 function testEscapeSequence() {
76 shouldBeUndefined("Function('\"use strict\"; return this;')()");
77 shouldThrow("Function('\"use strict\"; with({});')");
86 shouldBeSyntaxError("(function eval(){'use strict';})");
87 shouldBeSyntaxError("(function (eval){'use strict';})");
88 shouldBeSyntaxError("(function arguments(){'use strict';})");
89 shouldBeSyntaxError("(function (arguments){'use strict';})");
90 shouldBeSyntaxError("(function (){'use strict'; var eval;})");
91 shouldBeSyntaxError("(function (){'use strict'; var arguments;})");
92 shouldBeSyntaxError("(function (){'use strict'; try{}catch(eval){}})");
93 shouldBeSyntaxError("(function (){'use strict'; try{}catch(arguments){}})");
94 shouldBeSyntaxError("(function (a, a){'use strict';})");
95 shouldBeSyntaxError("(function (a){'use strict'; delete a;})()");
96 shouldBeSyntaxError("(function (){'use strict'; var a; delete a;})()");
97 shouldBeSyntaxError("(function (){var a; function f() {'use strict'; delete a;} })()");
98 shouldBeSyntaxError("(function (){'use strict'; with(1){};})");
99 shouldThrow("(function (){'use strict'; arguments.callee; })()");
100 shouldThrow("(function (){'use strict'; arguments.caller; })()");
101 shouldThrow("(function f(){'use strict'; f.arguments; })()");
102 shouldThrow("(function f(){'use strict'; f.caller; })()");
103 shouldThrow("(function f(){'use strict'; f.arguments=5; })()");
104 shouldThrow("(function f(){'use strict'; f.caller=5; })()");
105 shouldThrow("(function (arg){'use strict'; arguments.callee; })()");
106 shouldThrow("(function (arg){'use strict'; arguments.caller; })()");
107 shouldThrow("(function f(arg){'use strict'; f.arguments; })()");
108 shouldThrow("(function f(arg){'use strict'; f.caller; })()");
109 shouldThrow("(function f(arg){'use strict'; f.arguments=5; })()");
110 shouldThrow("(function f(arg){'use strict'; f.caller=5; })()");
113 shouldBeTrue('"caller" in function(){"use strict"}');
114 shouldBeTrue('(function(){"use strict";}).hasOwnProperty("caller")');
115 shouldBeTrue('"arguments" in function(){"use strict"}');
116 shouldBeTrue('(function(){"use strict";}).hasOwnProperty("arguments")');
118 shouldBeSyntaxError("'use strict'; (function (){with(1){};})");
119 shouldBeSyntaxError("'use strict'; (function (){var a; delete a;})");
120 shouldBeSyntaxError("'use strict'; var a; (function (){ delete a;})");
121 shouldBeSyntaxError("var a; (function (){ 'use strict'; delete a;})");
137 shouldBeSyntaxError("'use strict'; (function (){ delete someDeclaredGlobal;})");
138 shouldBeSyntaxError("(function (){ 'use strict'; delete someDeclaredGlobal;})");
141 shouldThrow("'use strict'; (function f(){ f = 'shouldn\\'t be able to assign to function expression name'; })()");
153 shouldBeSyntaxError("'use strict'; function f() { ++arguments }");
154 shouldBeSyntaxError("'use strict'; function f() { arguments++ }");
155 shouldBeSyntaxError("'use strict'; function f() { --arguments }");
156 shouldBeSyntaxError("'use strict'; function f() { arguments-- }");
163 shouldBeSyntaxError("'use strict'; function f() { ++(1, arguments) }");
164 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)++ }");
165 shouldBeSyntaxError("'use strict'; function f() { --(1, arguments) }");
166 shouldBeSyntaxError("'use strict'; function f() { (1, arguments)-- }");
171 shouldBeTrue("(function (a){'use strict'; a = false; return a !== arguments[0]; })(true)");
172 shouldBeTrue("(function (a){'use strict'; arguments[0] = false; return a !== arguments[0]; })(true)");
173 shouldBeTrue("(function (a){'use strict'; a=false; return arguments; })(true)[0]");
174 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; return a; })(true)");
175 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; })(false)[0]");
176 shouldBeTrue("(function (){'use strict'; arguments[0]=true; return arguments; })(false)[0]");
177 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; a=false; return arguments; })()[0]");
178 shouldBeTrue("(function (a){'use strict'; arguments[0]=false; a=true; return a; })()");
179 shouldBeTrue("(function (a){'use strict'; arguments[0]=true; return arguments; })()[0]");
180 shouldBeTrue("(function (){'use strict'; arguments[0]=true; return arguments; })()[0]");
183 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); a = false; return a !== arguments[0]; })(true)");
184 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0] = false; return a !== arguments[0]; })(true)");
185 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); a=false; return arguments; })(true)[0]");
186 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; return a; })(true)");
187 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0]");
188 shouldBeTrue("(function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })(false)[0]");
189 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; a=false; return arguments; })()[0]");
190 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0]");
191 shouldBeTrue("(function (a){'use strict'; var local; (function (){local;})(); arguments[0]=false; a=true; return a; })()");
192 shouldBeTrue("(function (){'use strict'; var local; (function (){local;})(); arguments[0]=true; return arguments; })()[0]");
194 shouldBeTrue("'use strict'; (function (){var a = true; eval('var a = false'); return a; })()");
195 shouldBeTrue("(function (){var a = true; eval('\"use strict\"; var a = false'); return a; })()");
197 shouldBeUndefined("(function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'arguments').value; })()");
198 shouldBeUndefined("(function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(f, 'caller').value; })()");
199 shouldBeUndefined("(function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'callee').value; })()");
200 shouldBeUndefined("(function f(arg){'use strict'; return Object.getOwnPropertyDescriptor(arguments, 'caller').value; })()");
201 shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'caller'); return descriptor.get === descriptor.set; })()");
202 shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(arguments, 'callee'); return descriptor.get === descriptor.set; })()");
203 shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })()");
204 shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })()");
205 shouldBeTrue("'use strict'; (function f() { for(var i in this); })(); true;")
220 shouldBeTrue("'use strict'; (function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
222 shouldBeTrue("(function () {'use strict'; try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
226 shouldBeTrue("(function () { try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
228 shouldBeTrue("(function () {try { throw 1; } catch (e) { aGlobal = true; }})(); aGlobal;");
231 shouldBe('String(Object.getOwnPropertyDescriptor(function() { "use strict"; }, "caller").get)', "'function () {\\n [native code]\\n}'");