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

Unified Diff: tests/compiler/dart2js/simple_inferrer_no_such_method_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 side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
index 45669dd57bd2d36c0fd04e54524432020a442d71..45b38787b1b5f8f2586234d9f117f0c3daf45ba3 100644
--- a/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_no_such_method_test.dart
@@ -4,6 +4,7 @@
import 'package:expect/expect.dart';
+import "package:async_helper/async_helper.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';
@@ -95,11 +96,8 @@ main() {
main() {
Uri uri = new Uri(scheme: 'source');
- var compiler = compilerFor(TEST1, uri);
- compiler.runCompiler(uri);
- var typesInferrer = compiler.typesTask.typesInferrer;
-
- checkReturn(String name, type) {
+ checkReturn(MockCompiler compiler, String name, type) {
+ var typesInferrer = compiler.typesTask.typesInferrer;
var element = findElement(compiler, name);
Expect.equals(
type,
@@ -107,27 +105,33 @@ main() {
name);
}
- checkReturn('test1', compiler.typesTask.intType);
- checkReturn('test2', compiler.typesTask.dynamicType.nonNullable());
- checkReturn('test3', compiler.typesTask.intType);
- checkReturn('test4', compiler.typesTask.mapType);
- checkReturn('test5', compiler.typesTask.dynamicType.nonNullable());
- checkReturn('test6', compiler.typesTask.dynamicType.nonNullable());
-
- compiler = compilerFor(TEST2, uri);
- compiler.runCompiler(uri);
- typesInferrer = compiler.typesTask.typesInferrer;
-
- checkReturn('test1', compiler.typesTask.dynamicType.nonNullable());
- checkReturn('test2', compiler.typesTask.mapType);
- checkReturn('test3', compiler.typesTask.mapType);
- checkReturn('test4', compiler.typesTask.mapType);
- checkReturn('test5', compiler.typesTask.mapType);
-
- checkReturn('test6', compiler.typesTask.numType);
- checkReturn('test7', compiler.typesTask.intType);
- checkReturn('test8', compiler.typesTask.intType);
- checkReturn('test9', compiler.typesTask.intType);
- checkReturn('test10', compiler.typesTask.numType);
- checkReturn('test11', compiler.typesTask.doubleType);
+ var compiler1 = compilerFor(TEST1, uri);
+ asyncTest(() => compiler1.runCompiler(uri).then((_) {
+ checkReturn(compiler1, 'test1', compiler1.typesTask.intType);
+ checkReturn(compiler1, 'test2',
+ compiler1.typesTask.dynamicType.nonNullable());
+ checkReturn(compiler1, 'test3', compiler1.typesTask.intType);
+ checkReturn(compiler1, 'test4', compiler1.typesTask.mapType);
+ checkReturn(compiler1, 'test5',
+ compiler1.typesTask.dynamicType.nonNullable());
+ checkReturn(compiler1, 'test6',
+ compiler1.typesTask.dynamicType.nonNullable());
+ }));
+
+ var compiler2 = compilerFor(TEST2, uri);
+ asyncTest(() => compiler2.runCompiler(uri).then((_) {
+ checkReturn(compiler2, 'test1',
+ compiler2.typesTask.dynamicType.nonNullable());
+ checkReturn(compiler2, 'test2', compiler2.typesTask.mapType);
+ checkReturn(compiler2, 'test3', compiler2.typesTask.mapType);
+ checkReturn(compiler2, 'test4', compiler2.typesTask.mapType);
+ checkReturn(compiler2, 'test5', compiler2.typesTask.mapType);
+
+ checkReturn(compiler2, 'test6', compiler2.typesTask.numType);
+ checkReturn(compiler2, 'test7', compiler2.typesTask.intType);
+ checkReturn(compiler2, 'test8', compiler2.typesTask.intType);
+ checkReturn(compiler2, 'test9', compiler2.typesTask.intType);
+ checkReturn(compiler2, 'test10', compiler2.typesTask.numType);
+ checkReturn(compiler2, 'test11', compiler2.typesTask.doubleType);
+ }));
}

Powered by Google App Engine
This is Rietveld 408576698