Debian Codegraph @

rhino/testsrc/jstests/inside-strict-mode.js

raw symbols SCIP
1 load("testsrc/assert.js");
2
3 assertThrows(function() {
4 'use strict';
5 return arguments.caller;
6 }, TypeError);
7
8 assertThrows(function() {
9 'use strict';
10 return arguments.callee;
11 }, TypeError);
12
13 assertEquals(undefined, function() {
14 return arguments.caller;
15 }());
16
17 function f1() {
18 return arguments.callee;
19 }
20
21 assertEquals(f1, f1());
22
23 // A simple function is not required activation.
24 // But when it changes to strict mode, requires activation.
25 assertThrows(function() {
26 'use strict';
27 delete Math.LN2;
28 }, TypeError);
29
30 "success";