23 lines
776 B
Plaintext
23 lines
776 B
Plaintext
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 SyntaxError: Left side of assignment is not a reference..
|
|
PASS (true ? x : y) = "FAIL"; threw exception SyntaxError: Left side of assignment is not a reference..
|
|
PASS x++ = "FAIL"; threw exception SyntaxError: Left hand side of operator '=' must be a reference..
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|