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

Unified Diff: tests/compiler/dart2js/simple_inferrer_and_or_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_and_or_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
index 22ec51a6ea0c7ccc4a8fc1cffff9910f8d52ae8c..19926f00f95269bf32af96cff9f785d8f61a8006 100644
--- a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_and_or_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 'compiler_helper.dart';
const String TEST = """
@@ -57,22 +58,23 @@ main() {
void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
- compiler.runCompiler(uri);
- var typesInferrer = compiler.typesTask.typesInferrer;
+ asyncTest(() => compiler.runCompiler(uri).then((_) {
+ var typesInferrer = compiler.typesTask.typesInferrer;
- checkReturn(String name, type) {
- var element = findElement(compiler, name);
- Expect.equals(type,
- typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
- }
+ checkReturn(String name, type) {
+ var element = findElement(compiler, name);
+ Expect.equals(type,
+ typesInferrer.getReturnTypeOfElement(element).simplify(compiler));
+ }
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+ var subclassOfInterceptor =
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
- checkReturn('returnDyn1', subclassOfInterceptor);
- checkReturn('returnDyn2', subclassOfInterceptor);
- checkReturn('returnDyn3', subclassOfInterceptor);
- checkReturn('returnDyn4', compiler.typesTask.dynamicType.nonNullable());
- checkReturn('returnDyn5', compiler.typesTask.dynamicType.nonNullable());
- checkReturn('returnDyn6', compiler.typesTask.dynamicType.nonNullable());
+ checkReturn('returnDyn1', subclassOfInterceptor);
+ checkReturn('returnDyn2', subclassOfInterceptor);
+ checkReturn('returnDyn3', subclassOfInterceptor);
+ checkReturn('returnDyn4', compiler.typesTask.dynamicType.nonNullable());
+ checkReturn('returnDyn5', compiler.typesTask.dynamicType.nonNullable());
+ checkReturn('returnDyn6', compiler.typesTask.dynamicType.nonNullable());
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/rewrite_better_user_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_closure_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698