Lines Matching full:test
32 function test(obj, source) {
38 // Test shadowing in eval scope.
39 test({ x: 42 }, "assertEquals(42, x)");
40 test({ y: 42 }, "assertEquals(27, x)");
42 // Test shadowing in local scope inside an eval scope.
43 test({ x: 42 }, "function f() { assertEquals(42, x) }; f();");
44 test({ y: 42 }, "function f() { assertEquals(27, x) }; f();");
46 // Test shadowing in local scope inside an eval scope. Deeper nesting
48 test({ x: 42 }, "function f() { function g() { assertEquals(42, x) }; g() }; f();");
49 test({ y: 42 }, "function f() { function g() { assertEquals(27, x) }; g() }; f();");
51 // Test shadowing in local scope inside an eval scope with eval calls in the eval scopes.
52 test({ x: 42 }, "function f() { eval('1'); assertEquals(42, x) }; f();");
53 test({ y: 42 }, "function f() { eval('1'); assertEquals(27, x) }; f();");
55 // Test shadowing in local scope inside an eval scope with eval calls
57 test({ x: 42 }, "function f() { function g() { eval('1'); assertEquals(42, x) }; g() }; f();");
58 test({ y: 42 }, "function f() { function g() { eval('1'); assertEquals(27, x) }; g() }; f();");