Lines Matching refs:f
28 var f = Function();
29 assertTrue(typeof f() == 'undefined');
30 f = new Function(); function
31 assertTrue(typeof f() == 'undefined');
33 f = Function('return 1');
34 assertEquals(1, f());
35 f = new Function('return 1');
36 assertEquals(1, f());
38 f = Function('return true');
39 assertTrue(f());
40 f = new Function('return true');
41 assertTrue(f());
43 f = Function('x', 'return x');
44 assertEquals(1, f(1));
45 assertEquals('bar', f('bar'));
46 assertTrue(typeof f() == 'undefined');
48 assertTrue(x === f(x));
50 f = Function('x', 'return x // comment');
51 assertEquals(1, f(1));
53 f = Function('return typeof anonymous');
54 assertEquals('undefined', f());
57 f = Function('return anonymous;');
58 assertEquals(42, f());
60 f = new Function('x', 'return x')
61 assertEquals(1, f(1));
62 assertEquals('bar', f('bar'));
63 assertTrue(typeof f() == 'undefined');
65 assertTrue(x === f(x));
67 f = Function('x', 'y', 'return x+y');
68 assertEquals(5, f(2, 3));
69 assertEquals('foobar', f('foo', 'bar'));
70 f = new Function('x', 'y', 'return x+y');
71 assertEquals(5, f(2, 3));
72 assertEquals('foobar', f('foo', 'bar'));
77 var f = Function(x, y, z);
78 assertEquals(25, f(5, 5));
79 assertEquals(42, f(2, 21));
80 f = new Function(x, y, z);
81 assertEquals(25, f(5, 5));
82 assertEquals(42, f(2, 21));