| 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 import 'package:expect/expect.dart'; | 5 import 'package:expect/expect.dart'; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
| 8 import 'package:compiler/src/messages.dart' show | 8 import 'package:compiler/src/diagnostics/messages.dart' show |
| 9 MessageKind, | 9 MessageKind, |
| 10 MessageTemplate; | 10 MessageTemplate; |
| 11 | 11 |
| 12 import 'message_kind_helper.dart'; | 12 import 'message_kind_helper.dart'; |
| 13 | 13 |
| 14 main(List<String> arguments) { | 14 main(List<String> arguments) { |
| 15 List<MessageTemplate> examples = <MessageTemplate>[]; | 15 List<MessageTemplate> examples = <MessageTemplate>[]; |
| 16 for (MessageKind kind in MessageKind.values) { | 16 for (MessageKind kind in MessageKind.values) { |
| 17 MessageTemplate template = MessageTemplate.TEMPLATES[kind]; | 17 MessageTemplate template = MessageTemplate.TEMPLATES[kind]; |
| 18 Expect.isNotNull(template, "No template for $kind."); | 18 Expect.isNotNull(template, "No template for $kind."); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 37 asyncTest(() => Future.forEach(examples, (MessageTemplate template) { | 37 asyncTest(() => Future.forEach(examples, (MessageTemplate template) { |
| 38 print("Checking '${template.kind}'."); | 38 print("Checking '${template.kind}'."); |
| 39 Stopwatch sw = new Stopwatch()..start(); | 39 Stopwatch sw = new Stopwatch()..start(); |
| 40 return check(template, cachedCompiler).then((var compiler) { | 40 return check(template, cachedCompiler).then((var compiler) { |
| 41 cachedCompiler = compiler; | 41 cachedCompiler = compiler; |
| 42 sw.stop(); | 42 sw.stop(); |
| 43 print("Checked '${template.kind}' in ${sw.elapsedMilliseconds}ms."); | 43 print("Checked '${template.kind}' in ${sw.elapsedMilliseconds}ms."); |
| 44 }); | 44 }); |
| 45 })); | 45 })); |
| 46 } | 46 } |
| OLD | NEW |