OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "dart:async"; | 5 import "dart:async"; |
6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
8 import "package:compiler/src/dart2jslib.dart"; | |
9 import "package:compiler/src/elements/elements.dart"; | 8 import "package:compiler/src/elements/elements.dart"; |
| 9 import "package:compiler/src/messages.dart"; |
10 import "package:compiler/src/resolution/resolution.dart"; | 10 import "package:compiler/src/resolution/resolution.dart"; |
11 import "package:compiler/src/util/util.dart"; | 11 import "package:compiler/src/util/util.dart"; |
12 import "mock_compiler.dart"; | 12 import "mock_compiler.dart"; |
13 | 13 |
14 | 14 |
15 class CallbackMockCompiler extends MockCompiler { | 15 class CallbackMockCompiler extends MockCompiler { |
16 CallbackMockCompiler() : super.internal(); | 16 CallbackMockCompiler() : super.internal(); |
17 | 17 |
18 var onError; | 18 var onError; |
19 var onWarning; | 19 var onWarning; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 compiler.setOnWarning( | 53 compiler.setOnWarning( |
54 (c, n, m) => Expect.equals(foo, compiler.currentElement)); | 54 (c, n, m) => Expect.equals(foo, compiler.currentElement)); |
55 foo.computeType(compiler); | 55 foo.computeType(compiler); |
56 Expect.equals(1, compiler.warnings.length); | 56 Expect.equals(1, compiler.warnings.length); |
57 }); | 57 }); |
58 } | 58 } |
59 | 59 |
60 main() { | 60 main() { |
61 asyncTest(() => testErrorHandling()); | 61 asyncTest(() => testErrorHandling()); |
62 } | 62 } |
OLD | NEW |