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

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: Remove withCurrentElementAsync Created 7 years, 5 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 691c95ba4324206af3c46bd7cdf8a7a8ecbb8ad6..375039a73c85fc2c0ae0f206142cf603f204c7e6 100644
--- a/tests/compiler/dart2js/list_tracer_test.dart
+++ b/tests/compiler/dart2js/list_tracer_test.dart
@@ -189,43 +189,44 @@ void main() {
void doTest(String allocation, {bool nullify}) {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(generateTest(allocation), uri);
- compiler.runCompiler(uri);
- var typesTask = compiler.typesTask;
- var typesInferrer = typesTask.typesInferrer;
-
- checkType(String name, type) {
- var element = findElement(compiler, name);
- ContainerTypeMask mask = typesInferrer.getTypeOfElement(element);
- if (nullify) type = type.nullable();
- Expect.equals(type, mask.elementType.simplify(compiler), name);
- }
+ compiler.runCompiler(uri).then((_) {
+ var typesTask = compiler.typesTask;
+ var typesInferrer = typesTask.typesInferrer;
+
+ checkType(String name, type) {
+ var element = findElement(compiler, name);
+ ContainerTypeMask mask = typesInferrer.getTypeOfElement(element);
+ if (nullify) type = type.nullable();
+ Expect.equals(type, mask.elementType.simplify(compiler), name);
+ }
- checkType('listInField', typesTask.numType);
- checkType('listPassedToMethod', typesTask.numType);
- checkType('listReturnedFromMethod', typesTask.numType);
- checkType('listUsedWithCascade', typesTask.numType);
- checkType('listUsedInClosure', typesTask.numType);
- checkType('listPassedToSelector', typesTask.numType);
- checkType('listReturnedFromSelector', typesTask.numType);
- checkType('listUsedWithAddAndInsert', typesTask.numType);
- checkType('listUsedWithConstraint', typesTask.numType);
- checkType('listEscapingFromSetter', typesTask.numType);
- checkType('listUsedInLocal', typesTask.numType);
- checkType('listEscapingInSetterValue', typesTask.numType);
- checkType('listEscapingInIndex', typesTask.numType);
- checkType('listEscapingInIndexSet', typesTask.intType);
- checkType('listEscapingTwiceInIndexSet', typesTask.numType);
- checkType('listSetInNonFinalField', typesTask.numType);
- checkType('listWithChangedLength', typesTask.intType.nullable());
-
- checkType('listPassedToClosure', typesTask.dynamicType);
- checkType('listReturnedFromClosure', typesTask.dynamicType);
- checkType('listUsedWithNonOkSelector', typesTask.dynamicType);
- checkType('listPassedAsOptionalParameter', typesTask.dynamicType);
- checkType('listPassedAsNamedParameter', typesTask.dynamicType);
-
- if (!allocation.contains('filled')) {
- checkType('listUnset', new TypeMask.nonNullEmpty());
- checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
- }
+ checkType('listInField', typesTask.numType);
+ checkType('listPassedToMethod', typesTask.numType);
+ checkType('listReturnedFromMethod', typesTask.numType);
+ checkType('listUsedWithCascade', typesTask.numType);
+ checkType('listUsedInClosure', typesTask.numType);
+ checkType('listPassedToSelector', typesTask.numType);
+ checkType('listReturnedFromSelector', typesTask.numType);
+ checkType('listUsedWithAddAndInsert', typesTask.numType);
+ checkType('listUsedWithConstraint', typesTask.numType);
+ checkType('listEscapingFromSetter', typesTask.numType);
+ checkType('listUsedInLocal', typesTask.numType);
+ checkType('listEscapingInSetterValue', typesTask.numType);
+ checkType('listEscapingInIndex', typesTask.numType);
+ checkType('listEscapingInIndexSet', typesTask.intType);
+ checkType('listEscapingTwiceInIndexSet', typesTask.numType);
+ checkType('listSetInNonFinalField', typesTask.numType);
+ checkType('listWithChangedLength', typesTask.intType.nullable());
+
+ checkType('listPassedToClosure', typesTask.dynamicType);
+ checkType('listReturnedFromClosure', typesTask.dynamicType);
+ checkType('listUsedWithNonOkSelector', typesTask.dynamicType);
+ checkType('listPassedAsOptionalParameter', typesTask.dynamicType);
+ checkType('listPassedAsNamedParameter', typesTask.dynamicType);
+
+ if (!allocation.contains('filled')) {
+ checkType('listUnset', new TypeMask.nonNullEmpty());
+ checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
+ }
+ });
}

Powered by Google App Engine
This is Rietveld 408576698