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

Unified Diff: tests/compiler/dart2js/list_tracer_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 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/list_tracer_test.dart
diff --git a/tests/compiler/dart2js/list_tracer_test.dart b/tests/compiler/dart2js/list_tracer_test.dart
index cff8c882ed07a0e5c14997094ed8e7bc83099fd7..fe1bd1765da2b3eb32e1dd3220393b5ac5637eac 100644
--- a/tests/compiler/dart2js/list_tracer_test.dart
+++ b/tests/compiler/dart2js/list_tracer_test.dart
@@ -4,8 +4,7 @@
import 'package:expect/expect.dart';
import "package:async_helper/async_helper.dart";
-import 'package:compiler/src/types/types.dart'
- show ContainerTypeMask, TypeMask;
+import 'package:compiler/src/types/types.dart' show ContainerTypeMask, TypeMask;
import 'compiler_helper.dart';
import 'type_mask_test_helper.dart';
@@ -199,45 +198,45 @@ void doTest(String allocation, {bool nullify}) {
var compiler = compilerFor(generateTest(allocation), uri,
expectedErrors: 0, expectedWarnings: 1);
asyncTest(() => compiler.run(uri).then((_) {
- var commonMasks = compiler.commonMasks;
- var typesInferrer = compiler.globalInference.typesInferrer;
-
- checkType(String name, type) {
- var element = findElement(compiler, name);
- ContainerTypeMask mask = typesInferrer.getTypeOfElement(element);
- if (nullify) type = type.nullable();
- Expect.equals(type, simplify(mask.elementType, compiler), name);
- }
-
- checkType('listInField', commonMasks.numType);
- checkType('listPassedToMethod', commonMasks.numType);
- checkType('listReturnedFromMethod', commonMasks.numType);
- checkType('listUsedWithCascade', commonMasks.numType);
- checkType('listUsedInClosure', commonMasks.numType);
- checkType('listPassedToSelector', commonMasks.numType);
- checkType('listReturnedFromSelector', commonMasks.numType);
- checkType('listUsedWithAddAndInsert', commonMasks.numType);
- checkType('listUsedWithConstraint', commonMasks.positiveIntType);
- checkType('listEscapingFromSetter', commonMasks.numType);
- checkType('listUsedInLocal', commonMasks.numType);
- checkType('listEscapingInSetterValue', commonMasks.numType);
- checkType('listEscapingInIndex', commonMasks.numType);
- checkType('listEscapingInIndexSet', commonMasks.uint31Type);
- checkType('listEscapingTwiceInIndexSet', commonMasks.numType);
- checkType('listSetInNonFinalField', commonMasks.numType);
- checkType('listWithChangedLength', commonMasks.uint31Type.nullable());
-
- checkType('listPassedToClosure', commonMasks.dynamicType);
- checkType('listReturnedFromClosure', commonMasks.dynamicType);
- checkType('listUsedWithNonOkSelector', commonMasks.dynamicType);
- checkType('listPassedAsOptionalParameter', commonMasks.numType);
- checkType('listPassedAsNamedParameter', commonMasks.numType);
- checkType('listStoredInList', commonMasks.uint31Type);
- checkType('listStoredInListButEscapes', commonMasks.dynamicType);
-
- if (!allocation.contains('filled')) {
- checkType('listUnset', new TypeMask.nonNullEmpty());
- checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
- }
- }));
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
+
+ checkType(String name, type) {
+ var element = findElement(compiler, name);
+ ContainerTypeMask mask = typesInferrer.getTypeOfElement(element);
+ if (nullify) type = type.nullable();
+ Expect.equals(type, simplify(mask.elementType, compiler), name);
+ }
+
+ checkType('listInField', commonMasks.numType);
+ checkType('listPassedToMethod', commonMasks.numType);
+ checkType('listReturnedFromMethod', commonMasks.numType);
+ checkType('listUsedWithCascade', commonMasks.numType);
+ checkType('listUsedInClosure', commonMasks.numType);
+ checkType('listPassedToSelector', commonMasks.numType);
+ checkType('listReturnedFromSelector', commonMasks.numType);
+ checkType('listUsedWithAddAndInsert', commonMasks.numType);
+ checkType('listUsedWithConstraint', commonMasks.positiveIntType);
+ checkType('listEscapingFromSetter', commonMasks.numType);
+ checkType('listUsedInLocal', commonMasks.numType);
+ checkType('listEscapingInSetterValue', commonMasks.numType);
+ checkType('listEscapingInIndex', commonMasks.numType);
+ checkType('listEscapingInIndexSet', commonMasks.uint31Type);
+ checkType('listEscapingTwiceInIndexSet', commonMasks.numType);
+ checkType('listSetInNonFinalField', commonMasks.numType);
+ checkType('listWithChangedLength', commonMasks.uint31Type.nullable());
+
+ checkType('listPassedToClosure', commonMasks.dynamicType);
+ checkType('listReturnedFromClosure', commonMasks.dynamicType);
+ checkType('listUsedWithNonOkSelector', commonMasks.dynamicType);
+ checkType('listPassedAsOptionalParameter', commonMasks.numType);
+ checkType('listPassedAsNamedParameter', commonMasks.numType);
+ checkType('listStoredInList', commonMasks.uint31Type);
+ checkType('listStoredInListButEscapes', commonMasks.dynamicType);
+
+ if (!allocation.contains('filled')) {
+ checkType('listUnset', new TypeMask.nonNullEmpty());
+ checkType('listOnlySetWithConstraint', new TypeMask.nonNullEmpty());
+ }
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/list_tracer_node_type_test.dart ('k') | tests/compiler/dart2js/list_tracer_typed_data_length_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698