2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/licenses/publicdomain/
9 "eval('var x = 2; typeof x');";
10 assertEq(testLenientAndStrict(code
, returns("number"), returns("number")),
14 "eval('\"use strict\"; var x = 2; typeof x');";
15 assertEq(testLenientAndStrict(code
, returns("number"), returns("number")),
19 "eval('var x = 2;'); " +
21 assertEq(testLenientAndStrict(code
, returns("number"), returns("undefined")),
25 "eval('\"use strict\"; var x = 2;'); " +
27 assertEq(testLenientAndStrict(code
, returns("undefined"), returns("undefined")),
31 "eval('\"use strict\"; var x = 2; typeof x'); " +
33 assertEq(testLenientAndStrict(code
, returns("undefined"), returns("undefined")),
39 " eval('var x = 2;'); " +
40 " return typeof x; " +
43 assertEq(testLenientAndStrict(code
, returns("number"), returns("undefined")),
50 " eval('var x = 2;'); " +
51 " return typeof x; " +
54 assertEq(testLenientAndStrict(code
, returns("undefined"), returns("undefined")),
60 " eval('\"use strict\"; var x = 2;'); " +
61 " return typeof x; " +
64 assertEq(testLenientAndStrict(code
, returns("undefined"), returns("undefined")),
67 reportCompare(true, true);
69 var successfullyParsed
= true;