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

Unified Diff: tests/compiler/dart2js/simple_inferrer_try_catch_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: Created 7 years, 6 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_try_catch_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
index 917ffe95f983958017d3a39cdc786a80158ab91d..a885fd0fe262895cd6971f1405809ca485b1f48e 100644
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
@@ -156,30 +156,31 @@ main() {
void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
- compiler.runCompiler(uri);
- var typesInferrer = compiler.typesTask.typesInferrer;
+ compiler.runCompiler(uri).then((_) {
+ var typesInferrer = compiler.typesTask.typesInferrer;
- checkReturn(String name, type) {
- var element = findElement(compiler, name);
- Expect.equals(type,
- typesInferrer.internal.returnTypeOf[element].simplify(compiler));
- }
+ checkReturn(String name, type) {
+ var element = findElement(compiler, name);
+ Expect.equals(type,
+ typesInferrer.internal.returnTypeOf[element].simplify(compiler));
+ }
- checkReturn('returnInt1', typesInferrer.intType);
- checkReturn('returnInt2', typesInferrer.intType);
- checkReturn('returnInt3', typesInferrer.intType);
- checkReturn('returnInt4', typesInferrer.intType);
- checkReturn('returnInt5', typesInferrer.intType);
- checkReturn('returnInt6',
- new TypeMask.nonNullSubtype(compiler.intClass.rawType));
-
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
-
- checkReturn('returnDyn1', subclassOfInterceptor);
- checkReturn('returnDyn2', subclassOfInterceptor);
- checkReturn('returnDyn3', subclassOfInterceptor);
- checkReturn('returnDyn4', subclassOfInterceptor);
- checkReturn('returnDyn5', subclassOfInterceptor);
- checkReturn('returnDyn6', typesInferrer.dynamicType);
+ checkReturn('returnInt1', typesInferrer.intType);
+ checkReturn('returnInt2', typesInferrer.intType);
+ checkReturn('returnInt3', typesInferrer.intType);
+ checkReturn('returnInt4', typesInferrer.intType);
+ checkReturn('returnInt5', typesInferrer.intType);
+ checkReturn('returnInt6',
+ new TypeMask.nonNullSubtype(compiler.intClass.rawType));
+
+ var subclassOfInterceptor =
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+
+ checkReturn('returnDyn1', subclassOfInterceptor);
+ checkReturn('returnDyn2', subclassOfInterceptor);
+ checkReturn('returnDyn3', subclassOfInterceptor);
+ checkReturn('returnDyn4', subclassOfInterceptor);
+ checkReturn('returnDyn5', subclassOfInterceptor);
+ checkReturn('returnDyn6', typesInferrer.dynamicType);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698