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

Unified Diff: tests/compiler/dart2js/simple_inferrer_postfix_prefix_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/simple_inferrer_postfix_prefix_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
index 2a94b4b9fd0d6c50391cbd7c293ce507695b85c6..3b308f076fa2598ec3578034551d226f3947fa38 100644
--- a/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_postfix_prefix_test.dart
@@ -66,35 +66,40 @@ void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
asyncTest(() => compiler.run(uri).then((_) {
- var commonMasks = compiler.commonMasks;
- var typesInferrer = compiler.globalInference.typesInferrer;
-
- checkReturnInClass(String className, String methodName, type) {
- var cls = findElement(compiler, className);
- var element = cls.lookupLocalMember(methodName);
- Expect.equals(type,
- simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
- methodName);
- }
-
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
-
- checkReturnInClass('A', 'returnNum1', commonMasks.numType);
- checkReturnInClass('A', 'returnNum2', commonMasks.numType);
- checkReturnInClass('A', 'returnNum3', commonMasks.numType);
- checkReturnInClass('A', 'returnNum4', commonMasks.numType);
- checkReturnInClass('A', 'returnEmpty1', const TypeMask.nonNullEmpty());
- checkReturnInClass('A', 'returnEmpty2', const TypeMask.nonNullEmpty());
- checkReturnInClass('A', 'returnDynamic1', subclassOfInterceptor);
- checkReturnInClass('A', 'returnDynamic2', subclassOfInterceptor);
- checkReturnInClass('A', 'returnEmpty3', const TypeMask.nonNullEmpty());
-
- checkReturnInClass('B', 'returnString1', commonMasks.stringType);
- checkReturnInClass('B', 'returnString2', commonMasks.stringType);
- checkReturnInClass('B', 'returnDynamic1', const TypeMask.nonNullEmpty());
- checkReturnInClass('B', 'returnDynamic2', const TypeMask.nonNullEmpty());
- checkReturnInClass('B', 'returnDynamic3', const TypeMask.nonNullEmpty());
- checkReturnInClass('B', 'returnDynamic4', const TypeMask.nonNullEmpty());
- }));
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
+
+ checkReturnInClass(String className, String methodName, type) {
+ var cls = findElement(compiler, className);
+ var element = cls.lookupLocalMember(methodName);
+ Expect.equals(
+ type,
+ simplify(typesInferrer.getReturnTypeOfElement(element), compiler),
+ methodName);
+ }
+
+ var subclassOfInterceptor =
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+
+ checkReturnInClass('A', 'returnNum1', commonMasks.numType);
+ checkReturnInClass('A', 'returnNum2', commonMasks.numType);
+ checkReturnInClass('A', 'returnNum3', commonMasks.numType);
+ checkReturnInClass('A', 'returnNum4', commonMasks.numType);
+ checkReturnInClass('A', 'returnEmpty1', const TypeMask.nonNullEmpty());
+ checkReturnInClass('A', 'returnEmpty2', const TypeMask.nonNullEmpty());
+ checkReturnInClass('A', 'returnDynamic1', subclassOfInterceptor);
+ checkReturnInClass('A', 'returnDynamic2', subclassOfInterceptor);
+ checkReturnInClass('A', 'returnEmpty3', const TypeMask.nonNullEmpty());
+
+ checkReturnInClass('B', 'returnString1', commonMasks.stringType);
+ checkReturnInClass('B', 'returnString2', commonMasks.stringType);
+ checkReturnInClass(
+ 'B', 'returnDynamic1', const TypeMask.nonNullEmpty());
+ checkReturnInClass(
+ 'B', 'returnDynamic2', const TypeMask.nonNullEmpty());
+ checkReturnInClass(
+ 'B', 'returnDynamic3', const TypeMask.nonNullEmpty());
+ checkReturnInClass(
+ 'B', 'returnDynamic4', const TypeMask.nonNullEmpty());
+ }));
}

Powered by Google App Engine
This is Rietveld 408576698