1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 Use of this source code is governed by a BSD-style license that can be
3 found in the LICENSE file. */
5 /* This file tests parsing of enumerations under different conditions */
15 /* FAIL Enum missing name. */
27 /* FAIL Unexpected empty block. */
35 /* OK EnumItem(E10) */
36 /* FAIL Trailing comma in block. */
40 /* FAIL Unexpected trailing comment. */
46 /* Bad comment because of Es6 */
54 /* OK EnumItem(E12) */
56 /* OK EnumItem(E13) */
57 /* FAIL Unexpected value 13.0 after "=". */
59 /* FAIL Unexpected string "hello" after "=". */
60 /* OK EnumItem(E14) */
62 /* OK EnumItem(E15) */
68 /* OK EnumItem(Es9_1) */
70 /* OK EnumItem(Es9_2) */
72 /* OK EnumItem(Es9_3) */
73 Es9_3
= Es9_1
<< Es9_2
,
74 /* OK EnumItem(Es9_3a) */
75 /* FAIL Unexpected symbol Es9_2 after symbol Es9_1. */
77 /* OK EnumItem(Es9_4) */
78 Es9_4
= Es9_1
>> Es9_2
,
79 /* OK EnumItem(Es9_5) */
80 Es9_5
= Es9_1 | Es9_2
,
81 /* OK EnumItem(Es9_6) */
82 Es9_6
= Es9_1
& Es9_2
,
83 /* OK EnumItem(Es9_7) */
84 Es9_7
= Es9_1 ^ Es9_2
,
85 /* OK EnumItem(Es9_8) */
86 Es9_8
= Es9_1
+ Es9_2
,
87 /* OK EnumItem(Es9_9) */
88 Es9_9
= Es9_1
- Es9_2
,
89 /* OK EnumItem(Es9_10) */
90 Es9_10
= Es9_1
* Es9_2
,
91 /* OK EnumItem(Es9_11) */
92 Es9_11
= Es9_1
/ Es9_2
,
93 /* OK EnumItem(Es9_12) */
95 /* OK EnumItem(Es9_13) */
97 /* OK EnumItem(Es9_14) */
99 /* OK EnumItem(Es9_14a) */
100 /* FAIL Unexpected ,. */
102 /* OK EnumItem(Es9_15) */
103 Es9_15
= (Es9_1
+ Es9_2
) << Es9_3
+ 1,
104 /* OK EnumItem(Es9_16) */
105 Es9_16
= Es9_1
+ -Es9_2