Lines Matching refs:const
2 "This test checks that const declarations in JavaScript work and are readonly."
6 shouldThrow("const redef='a'; const redef='a';");
8 const x = "RIGHT";
12 const z = "RIGHT", y = "RIGHT";
16 const one = 1;
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");
102 const inWith1 = "WRONG";
103 const inWith2 = "RIGHT";
113 shouldBe("const a;", "undefined");
117 const bodyId = (ranConstInitialiser = true, "Const initialiser overwrote existing property");