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

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: 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_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 8e47f93c0600afb81d7a376d713db332bff11c96..aa29c720b87e8fe5001d3c58a818940d8e63408f 100644
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:expect/expect.dart';
+import "package:async_helper/async_helper.dart";
import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'
show TypeMask;
@@ -166,32 +167,32 @@ main() {
void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
- compiler.runCompiler(uri);
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
-
- checkReturn(String name, type) {
- var element = findElement(compiler, name);
- Expect.equals(type,
- typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
- }
+ asyncTest(() => compiler.runCompiler(uri).then((_) {
+ var typesTask = compiler.typesTask;
+ var typesInferrer = typesTask.typesInferrer;
+
+ checkReturn(String name, type) {
+ var element = findElement(compiler, name);
+ Expect.equals(type,
+ typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
+ }
- checkReturn('returnInt1', typesTask.intType);
- checkReturn('returnInt2', typesTask.intType);
- checkReturn('returnInt3', typesTask.intType);
- checkReturn('returnInt4', typesTask.intType);
- checkReturn('returnInt5', typesTask.intType);
- checkReturn('returnInt6',
- new TypeMask.nonNullSubtype(compiler.intClass.rawType));
- checkReturn('returnInt7', typesTask.intType);
-
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
-
- checkReturn('returnDyn1', subclassOfInterceptor);
- checkReturn('returnDyn2', subclassOfInterceptor);
- checkReturn('returnDyn3', subclassOfInterceptor);
- checkReturn('returnDyn4', subclassOfInterceptor);
- checkReturn('returnDyn5', subclassOfInterceptor);
- checkReturn('returnDyn6', typesTask.dynamicType);
+ checkReturn('returnInt1', typesTask.intType);
+ checkReturn('returnInt2', typesTask.intType);
+ checkReturn('returnInt3', typesTask.intType);
+ checkReturn('returnInt4', typesTask.intType);
+ checkReturn('returnInt5', typesTask.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', typesTask.dynamicType);
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698