1
// Any copyright is dedicated to the Public Domain.
2
// http://creativecommons.org/licenses/publicdomain/
6
function directArg(eval, s) {
11
function directVar(f, s) {
17
function directWith(obj, s) {
28
// direct eval, even though 'eval' is an argument
29
assertEq(directArg(eval, 'a+1'), 2);
31
// direct eval, even though 'eval' is a var
32
assertEq(directVar(eval, 'a+1'), 2);
34
// direct eval, even though 'eval' is found via a with block
35
assertEq(directWith(this, 'a+1'), 2);
36
assertEq(directWith({eval: eval, a: -1000}, 'a+1'), 2);