Lines Matching refs:function
51 shouldBe("function f() { const one = 1; one++; return one; } f();", "1");
52 shouldBe("function f() { const oneString = '1'; return oneString++; } f();", "1");
53 shouldBe("function f() { const one = 1; return one++; } f();", "1");
56 shouldBe("function f() { const one = 1; one--; return one; } f();", "1");
57 shouldBe("function f() { const oneString = '1'; return oneString--; } f();", "1");
58 shouldBe("function f() { const one = 1; return one--; } f();", "1");
61 shouldBe("function f() { const one = 1; ++one; return one; } f();", "1");
62 shouldBe("function f() { const one = 1; return ++one; } f();", "2");
65 shouldBe("function f() { const one = 1; --one; return one; } f();", "1");
66 shouldBe("function f() { const one = 1; return --one; } f();", "0");
69 shouldBe("function f() { const one = 1; one += 2; return one; } f();", "1");
70 shouldBe("function f() { const one = 1; return one += 2; } f();", "3");
73 shouldBe("function f() { const one = 1; one = 2; return one; } f();", "1");
74 shouldBe("function f() { const one = 1; return one = 2; } f();", "2");
109 shouldBe("(function(){ one = 2; return one; })()", "1")
110 var f = function g() { g="FAIL"; return g; };