Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: tests/compiler/dart2js/message_kind_test.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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';
6 import 'dart:async';
7 import "package:async_helper/async_helper.dart";
5 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' show 8 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' show
6 DualKind, 9 DualKind,
7 MessageKind; 10 MessageKind;
8 11
9 import 'message_kind_helper.dart'; 12 import 'message_kind_helper.dart';
10 13
11 import 'dart:mirrors'; 14 import 'dart:mirrors';
12 15
13 main() { 16 main() {
14 ClassMirror cls = reflectClass(MessageKind); 17 ClassMirror cls = reflectClass(MessageKind);
(...skipping 21 matching lines...) Expand all
36 || name == 'PLEASE_REPORT_THE_CRASH' 39 || name == 'PLEASE_REPORT_THE_CRASH'
37 // We cannot provide examples for patch errors. 40 // We cannot provide examples for patch errors.
38 || name.startsWith('PATCH_')) continue; 41 || name.startsWith('PATCH_')) continue;
39 if (kind.examples != null) { 42 if (kind.examples != null) {
40 examples.add(name); 43 examples.add(name);
41 } else { 44 } else {
42 print("No example in '$name'"); 45 print("No example in '$name'");
43 } 46 }
44 }; 47 };
45 var cachedCompiler; 48 var cachedCompiler;
46 for (String name in examples) { 49 asyncTest(() => Future.forEach(examples, (String name) {
47 Stopwatch sw = new Stopwatch()..start(); 50 Stopwatch sw = new Stopwatch()..start();
48 cachedCompiler = check(kinds[name], cachedCompiler); 51 return check(kinds[name], cachedCompiler).
49 sw.stop(); 52 then((var compiler) {
50 print("Checked '$name' in ${sw.elapsedMilliseconds}ms."); 53 cachedCompiler = compiler;
51 } 54 sw.stop();
55 print("Checked '$name' in ${sw.elapsedMilliseconds}ms.");
56 });
57 }
58 ));
52 } 59 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/message_kind_helper.dart ('k') | tests/compiler/dart2js/metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698