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

Unified 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: Rebased Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/message_kind_test.dart
diff --git a/tests/compiler/dart2js/message_kind_test.dart b/tests/compiler/dart2js/message_kind_test.dart
index 6a2e64119732061dd7f5802e00f844c31d16e551..9b174abea05873f7d96b449c4a796ce9fc07a70a 100644
--- a/tests/compiler/dart2js/message_kind_test.dart
+++ b/tests/compiler/dart2js/message_kind_test.dart
@@ -2,6 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'package:expect/expect.dart';
+import 'dart:async';
+import '../../async_helper.dart';
import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' show
DualKind,
MessageKind;
@@ -49,11 +52,16 @@ main() {
}
};
var cachedCompiler;
- examples.forEach((String name, bool expectNoHowToFix) {
+ asyncTest(() => Future.forEach(examples.keys, (String name) {
+ bool expectNoHowToFix = examples[name];
Stopwatch sw = new Stopwatch()..start();
- cachedCompiler = check(kinds[name], cachedCompiler,
- expectNoHowToFix: expectNoHowToFix);
- sw.stop();
- print("Checked '$name' in ${sw.elapsedMilliseconds}ms.");
- });
-}
+ return check(kinds[name],
+ cachedCompiler, expectNoHowToFix: expectNoHowToFix).
+ then((var compiler) {
+ cachedCompiler = compiler;
+ sw.stop();
+ print("Checked '$name' in ${sw.elapsedMilliseconds}ms.");
+ });
+ }
+ ));
+}

Powered by Google App Engine
This is Rietveld 408576698