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

Unified Diff: tests/compiler/dart2js/list_tracer_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/list_tracer_test.dart
diff --git a/tests/compiler/dart2js/list_tracer_test.dart b/tests/compiler/dart2js/list_tracer_test.dart
index 666c4e06813b8ed9aaaba58f57fbb7eb603aad4c..d54e8e431a34a28978a94917d2b033b50e8ade7c 100644
--- a/tests/compiler/dart2js/list_tracer_test.dart
+++ b/tests/compiler/dart2js/list_tracer_test.dart
@@ -189,42 +189,43 @@ void main() {
void doTest(String allocation, {bool nullify}) {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(generateTest(allocation), uri);
- compiler.runCompiler(uri);
- var typesInferrer = compiler.typesTask.typesInferrer;
-
- checkType(String name, type) {
- var element = findElement(compiler, name);
- ContainerTypeMask mask = typesInferrer.internal.typeOf[element];
- if (nullify) type = type.nullable();
- Expect.equals(type, mask.elementType.simplify(compiler), name);
- }
+ compiler.runCompiler(uri).then((_) {
+ var typesInferrer = compiler.typesTask.typesInferrer;
+
+ checkType(String name, type) {
+ var element = findElement(compiler, name);
+ ContainerTypeMask mask = typesInferrer.internal.typeOf[element];
+ if (nullify) type = type.nullable();
+ Expect.equals(type, mask.elementType.simplify(compiler), name);
+ }
- checkType('listInField', typesInferrer.numType);
- checkType('listPassedToMethod', typesInferrer.numType);
- checkType('listReturnedFromMethod', typesInferrer.numType);
- checkType('listUsedWithCascade', typesInferrer.numType);
- checkType('listUsedInClosure', typesInferrer.numType);
- checkType('listPassedToSelector', typesInferrer.numType);
- checkType('listReturnedFromSelector', typesInferrer.numType);
- checkType('listUsedWithAddAndInsert', typesInferrer.numType);
- checkType('listUsedWithConstraint', typesInferrer.numType);
- checkType('listEscapingFromSetter', typesInferrer.numType);
- checkType('listUsedInLocal', typesInferrer.numType);
- checkType('listEscapingInSetterValue', typesInferrer.numType);
- checkType('listEscapingInIndex', typesInferrer.numType);
- checkType('listEscapingInIndexSet', typesInferrer.intType);
- checkType('listEscapingTwiceInIndexSet', typesInferrer.numType);
- checkType('listSetInNonFinalField', typesInferrer.numType);
- checkType('listWithChangedLength', typesInferrer.intType.nullable());
-
- checkType('listPassedToClosure', typesInferrer.dynamicType);
- checkType('listReturnedFromClosure', typesInferrer.dynamicType);
- checkType('listUsedWithNonOkSelector', typesInferrer.dynamicType);
- checkType('listPassedAsOptionalParameter', typesInferrer.dynamicType);
- checkType('listPassedAsNamedParameter', typesInferrer.dynamicType);
-
- if (!allocation.contains('filled')) {
- checkType('listUnset', new TypeMask.nonNullEmpty());
- checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
- }
+ checkType('listInField', typesInferrer.numType);
+ checkType('listPassedToMethod', typesInferrer.numType);
+ checkType('listReturnedFromMethod', typesInferrer.numType);
+ checkType('listUsedWithCascade', typesInferrer.numType);
+ checkType('listUsedInClosure', typesInferrer.numType);
+ checkType('listPassedToSelector', typesInferrer.numType);
+ checkType('listReturnedFromSelector', typesInferrer.numType);
+ checkType('listUsedWithAddAndInsert', typesInferrer.numType);
+ checkType('listUsedWithConstraint', typesInferrer.numType);
+ checkType('listEscapingFromSetter', typesInferrer.numType);
+ checkType('listUsedInLocal', typesInferrer.numType);
+ checkType('listEscapingInSetterValue', typesInferrer.numType);
+ checkType('listEscapingInIndex', typesInferrer.numType);
+ checkType('listEscapingInIndexSet', typesInferrer.intType);
+ checkType('listEscapingTwiceInIndexSet', typesInferrer.numType);
+ checkType('listSetInNonFinalField', typesInferrer.numType);
+ checkType('listWithChangedLength', typesInferrer.intType.nullable());
+
+ checkType('listPassedToClosure', typesInferrer.dynamicType);
+ checkType('listReturnedFromClosure', typesInferrer.dynamicType);
+ checkType('listUsedWithNonOkSelector', typesInferrer.dynamicType);
+ checkType('listPassedAsOptionalParameter', typesInferrer.dynamicType);
+ checkType('listPassedAsNamedParameter', typesInferrer.dynamicType);
+
+ if (!allocation.contains('filled')) {
+ checkType('listUnset', new TypeMask.nonNullEmpty());
+ checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
+ }
+ });
}

Powered by Google App Engine
This is Rietveld 408576698