2 "This test checks whether various forms of assignment expression are allowed."
8 shouldBe('x = 1; x', '1');
10 shouldBe('window.x = 2; x', '2');
11 shouldBe('window["x"] = 3; x', '3');
12 shouldBe('(x) = 4; x', "4");
13 shouldBe('(window.x) = 5; x', '5');
14 shouldBe('(window["x"]) = 6; x', '6');
15 shouldBe('y, x = 7; x', '7');
16 shouldBe('((x)) = 8; x', '8');
17 shouldBe('((window.x)) = 9; x', '9');
18 shouldBe('((window["x"])) = 10; x', '10');
20 shouldThrow('(y, x) = "FAIL";');
21 shouldThrow('(true ? x : y) = "FAIL";');
22 shouldThrow('x++ = "FAIL";');