| OLD | NEW |
| 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 Use of this source code is governed by a BSD-style license that can be |
| 3 found in the LICENSE file. */ | 3 found in the LICENSE file. */ |
| 4 | 4 |
| 5 /* This file tests parsing of enumerations under different conditions */ | 5 /* This file tests parsing of enumerations under different conditions */ |
| 6 | 6 |
| 7 /* OK Enum(Es1) */ | 7 /* OK Enum(Es1) */ |
| 8 enum Es1 { | 8 enum Es1 { |
| 9 /* OK EnumItem(E1) */ | 9 /* OK EnumItem(E1) */ |
| 10 E1 = 1, | 10 E1 = 1, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 /* FAIL Trailing comma in block. */ | 36 /* FAIL Trailing comma in block. */ |
| 37 E10 = 10, | 37 E10 = 10, |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 /* FAIL Unexpected trailing comment. */ | 40 /* FAIL Unexpected trailing comment. */ |
| 41 enum Es6 { | 41 enum Es6 { |
| 42 E5 = 11, | 42 E5 = 11, |
| 43 E6 = 12 | 43 E6 = 12 |
| 44 } | 44 } |
| 45 | 45 |
| 46 /* OK Enum(Es7) */ | 46 /* Bad comment because of Es6 */ |
| 47 enum Es7 { | 47 enum Es7 { |
| 48 /* OK EnumItem(E11) */ | |
| 49 E11 = 11 | 48 E11 = 11 |
| 50 }; | 49 }; |
| 51 | 50 |
| 52 | 51 |
| 53 /* OK Enum(Es8) */ | 52 /* OK Enum(Es8) */ |
| 54 enum Es8 { | 53 enum Es8 { |
| 55 /* OK EnumItem(E12) */ | 54 /* OK EnumItem(E12) */ |
| 56 E12 = 12, | 55 E12 = 12, |
| 57 /* OK EnumItem(E13) */ | 56 /* OK EnumItem(E13) */ |
| 57 /* FAIL Unexpected value 13.0 after "=". */ |
| 58 E13 = 13.0, | 58 E13 = 13.0, |
| 59 /* FAIL Unexpected string "hello" after "=". */ | 59 /* FAIL Unexpected string "hello" after "=". */ |
| 60 /* OK EnumItem(E14) */ | 60 /* OK EnumItem(E14) */ |
| 61 E14 = "hello", | 61 E14 = "hello", |
| 62 /* OK EnumItem(E15) */ | 62 /* OK EnumItem(E15) */ |
| 63 E15 = 0x400 | 63 E15 = 0x400 |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 /* OK Enum(Es9) */ | 66 /* OK Enum(Es9) */ |
| 67 enum Es9 { | 67 enum Es9 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 /* OK EnumItem(Es9_14a) */ | 99 /* OK EnumItem(Es9_14a) */ |
| 100 /* FAIL Unexpected ,. */ | 100 /* FAIL Unexpected ,. */ |
| 101 Es9_14a = (Es9_1, | 101 Es9_14a = (Es9_1, |
| 102 /* OK EnumItem(Es9_15) */ | 102 /* OK EnumItem(Es9_15) */ |
| 103 Es9_15 = (Es9_1 + Es9_2) << Es9_3 + 1, | 103 Es9_15 = (Es9_1 + Es9_2) << Es9_3 + 1, |
| 104 /* OK EnumItem(Es9_16) */ | 104 /* OK EnumItem(Es9_16) */ |
| 105 Es9_16 = Es9_1 + -Es9_2 | 105 Es9_16 = Es9_1 + -Es9_2 |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 | 108 |
| OLD | NEW |