Add native libraries to gn apks
[chromium-blink-merge.git] / ppapi / generators / test_parser / enum.idl
blob7048d4f562c5ef2266ba7264583685cc65b4dde2
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 */
7 /* OK Enum(Es1) */
8 enum Es1 {
9 /* OK EnumItem(E1) */
10 E1 = 1,
11 /* OK EnumItem(E2) */
12 E2 = 2
15 /* FAIL Enum missing name. */
16 enum {
17 E3 = 3,
18 E4 = 4
21 /* OK Enum(Es3) */
22 enum Es3 {
23 E5 = 1 << 1,
24 E6 = 3 << 2
27 /* FAIL Unexpected empty block. */
28 enum Es4 {
31 /* OK Enum(Es5) */
32 enum Es5 {
33 /* OK EnumItem(E9) */
34 E9 = 9,
35 /* OK EnumItem(E10) */
36 /* FAIL Trailing comma in block. */
37 E10 = 10,
40 /* FAIL Unexpected trailing comment. */
41 enum Es6 {
42 E5 = 11,
43 E6 = 12
46 /* Bad comment because of Es6 */
47 enum Es7 {
48 E11 = 11
52 /* OK Enum(Es8) */
53 enum Es8 {
54 /* OK EnumItem(E12) */
55 E12 = 12,
56 /* OK EnumItem(E13) */
57 /* FAIL Unexpected value 13.0 after "=". */
58 E13 = 13.0,
59 /* FAIL Unexpected string "hello" after "=". */
60 /* OK EnumItem(E14) */
61 E14 = "hello",
62 /* OK EnumItem(E15) */
63 E15 = 0x400
66 /* OK Enum(Es9) */
67 enum Es9 {
68 /* OK EnumItem(Es9_1) */
69 Es9_1 = 0,
70 /* OK EnumItem(Es9_2) */
71 Es9_2 = Es9_1,
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. */
76 Es9_3a = Es9_1 Es9_2,
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) */
94 Es9_12 = -Es9_1,
95 /* OK EnumItem(Es9_13) */
96 Es9_13 = ~Es9_1,
97 /* OK EnumItem(Es9_14) */
98 Es9_14 = (Es9_1),
99 /* OK EnumItem(Es9_14a) */
100 /* FAIL Unexpected ,. */
101 Es9_14a = (Es9_1,
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