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

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

Issue 152593002: Version 1.2.0-dev.3.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 10 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'; 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 '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' show 8 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' show
9 DualKind, 9 DualKind,
10 MessageKind; 10 MessageKind;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // We cannot provide examples for patch errors. 42 // We cannot provide examples for patch errors.
43 || name.startsWith('PATCH_')) continue; 43 || name.startsWith('PATCH_')) continue;
44 if (kind.examples != null) { 44 if (kind.examples != null) {
45 examples.add(name); 45 examples.add(name);
46 } else { 46 } else {
47 print("No example in '$name'"); 47 print("No example in '$name'");
48 } 48 }
49 }; 49 };
50 var cachedCompiler; 50 var cachedCompiler;
51 asyncTest(() => Future.forEach(examples, (String name) { 51 asyncTest(() => Future.forEach(examples, (String name) {
52 print("Checking '$name'.");
52 Stopwatch sw = new Stopwatch()..start(); 53 Stopwatch sw = new Stopwatch()..start();
54 bool useCachedCompiler = true;
55 if (name == 'MISSING_LIBRARY_NAME') {
56 // TODO(johnniwinther): Found out why we cannot use the cached compiler
57 // for this message kind.
58 cachedCompiler = null;
59 }
53 return check(kinds[name], cachedCompiler). 60 return check(kinds[name], cachedCompiler).
54 then((var compiler) { 61 then((var compiler) {
55 cachedCompiler = compiler; 62 cachedCompiler = compiler;
56 sw.stop(); 63 sw.stop();
57 print("Checked '$name' in ${sw.elapsedMilliseconds}ms."); 64 print("Checked '$name' in ${sw.elapsedMilliseconds}ms.");
58 }); 65 });
59 } 66 }
60 )); 67 ));
61 } 68 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/memory_source_file_helper.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698