blob: d624870bd65fc82b5a9a008cbc609ce8abc2712e [file] [log] [blame]
This test checks whether various forms of assignment expression are allowed.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS x = 1; x is 1
PASS window.x = 2; x is 2
PASS window["x"] = 3; x is 3
PASS (x) = 4; x is 4
PASS (window.x) = 5; x is 5
PASS (window["x"]) = 6; x is 6
PASS y, x = 7; x is 7
PASS ((x)) = 8; x is 8
PASS ((window.x)) = 9; x is 9
PASS ((window["x"])) = 10; x is 10
PASS (y, x) = "FAIL"; threw exception ReferenceError: Invalid left-hand side in assignment.
PASS (true ? x : y) = "FAIL"; threw exception ReferenceError: Invalid left-hand side in assignment.
PASS x++ = "FAIL"; threw exception ReferenceError: Invalid left-hand side in assignment.
PASS successfullyParsed is true
TEST COMPLETE