blob: 50d194707b99dc185a7c48c39f827cf5e0406401 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
This test checks whether various forms of preincrement expression are allowed.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ++x is 1
PASS ++window.x is 2
PASS ++window["x"] is 3
PASS ++(x) is 4
PASS ++(window.x) is 5
PASS ++(window["x"]) is 6
PASS (y, ++x) is 7
PASS ++((x)) is 8
PASS ++((window.x)) is 9
PASS ++((window["x"])) is 10
PASS ++(y, x) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS ++(true ? x : y) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS ++++x threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS successfullyParsed is true
TEST COMPLETE
|