| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.test.message_kind_helper; | 5 library dart2js.test.message_kind_helper; |
| 6 | 6 |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:compiler/src/dart2jslib.dart' show | 10 import 'package:compiler/src/dart2jslib.dart' show |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 MessageKind.FINAL_FUNCTION_TYPE_PARAMETER, | 31 MessageKind.FINAL_FUNCTION_TYPE_PARAMETER, |
| 32 MessageKind.FORMAL_DECLARED_CONST, | 32 MessageKind.FORMAL_DECLARED_CONST, |
| 33 MessageKind.FORMAL_DECLARED_STATIC, | 33 MessageKind.FORMAL_DECLARED_STATIC, |
| 34 MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT, | 34 MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT, |
| 35 MessageKind.HIDDEN_IMPLICIT_IMPORT, | 35 MessageKind.HIDDEN_IMPLICIT_IMPORT, |
| 36 MessageKind.HIDDEN_IMPORT, | 36 MessageKind.HIDDEN_IMPORT, |
| 37 MessageKind.INHERIT_GETTER_AND_METHOD, | 37 MessageKind.INHERIT_GETTER_AND_METHOD, |
| 38 MessageKind.UNIMPLEMENTED_METHOD, | 38 MessageKind.UNIMPLEMENTED_METHOD, |
| 39 MessageKind.UNIMPLEMENTED_METHOD_ONE, | 39 MessageKind.UNIMPLEMENTED_METHOD_ONE, |
| 40 MessageKind.VAR_FUNCTION_TYPE_PARAMETER, | 40 MessageKind.VAR_FUNCTION_TYPE_PARAMETER, |
| 41 MessageKind.VOID_NOT_ALLOWED, | |
| 42 | |
| 43 MessageKind.INVALID_STARRED_KEYWORD, // TODO(ahe): Have CL to fix this. | |
| 44 MessageKind.INVALID_SYNC_MODIFIER, // TODO(ahe): Have CL to fix this. | |
| 45 MessageKind.NATIVE_NOT_SUPPORTED, // TODO(ahe): Have CL to fix this. | |
| 46 MessageKind.UNMATCHED_TOKEN, // TODO(ahe): Have CL to fix this. | |
| 47 MessageKind.UNTERMINATED_STRING, // TODO(ahe): Have CL to fix this. | |
| 48 ]); | 41 ]); |
| 49 | 42 |
| 50 /// Most messages can be tested without causing a fatal error. Add an exception | 43 /// Most messages can be tested without causing a fatal error. Add an exception |
| 51 /// here if a fatal error is unavoidable and leads to pending classes. | 44 /// here if a fatal error is unavoidable and leads to pending classes. |
| 52 /// Try to avoid adding exceptions here; a fatal error causes the compiler to | 45 /// Try to avoid adding exceptions here; a fatal error causes the compiler to |
| 53 /// stop before analyzing all input, and it isn't safe to reuse it. | 46 /// stop before analyzing all input, and it isn't safe to reuse it. |
| 54 final Set<MessageKind> kindsWithPendingClasses = new Set<MessageKind>.from([ | 47 final Set<MessageKind> kindsWithPendingClasses = new Set<MessageKind>.from([ |
| 55 // If you add something here, please file a *new* bug report. | 48 // If you add something here, please file a *new* bug report. |
| 56 ]); | 49 ]); |
| 57 | 50 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 Expect.isTrue(!pendingStuff || kindsWithPendingClasses.contains(kind)); | 126 Expect.isTrue(!pendingStuff || kindsWithPendingClasses.contains(kind)); |
| 134 | 127 |
| 135 if (!pendingStuff) { | 128 if (!pendingStuff) { |
| 136 // If there is pending stuff, or the compiler was cancelled, we | 129 // If there is pending stuff, or the compiler was cancelled, we |
| 137 // shouldn't reuse the compiler. | 130 // shouldn't reuse the compiler. |
| 138 cachedCompiler = compiler; | 131 cachedCompiler = compiler; |
| 139 } | 132 } |
| 140 }); | 133 }); |
| 141 }).then((_) => cachedCompiler); | 134 }).then((_) => cachedCompiler); |
| 142 } | 135 } |
| OLD | NEW |