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

Unified Diff: tests/compiler/dart2js/simple_inferrer_try_catch_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_try_catch_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart b/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
index fb8ea18dfc5bc712ef215e971f9a024bd1761f8f..f17308b62120e47e5418a0e6aa5501bccc06fe6a 100644
--- a/tests/compiler/dart2js/simple_inferrer_try_catch_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_try_catch_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 TypeMask;
+import 'package:compiler/src/types/types.dart' show TypeMask;
import 'compiler_helper.dart';
import 'type_mask_test_helper.dart';
@@ -164,36 +163,39 @@ main() {
}
""";
-
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;
-
- checkReturn(String name, type) {
- var element = findElement(compiler, name);
- Expect.equals(type,
- simplify(typesInferrer.getReturnTypeOfElement(element), compiler));
- }
-
- checkReturn('returnInt1', commonMasks.uint31Type);
- checkReturn('returnInt2', commonMasks.uint31Type);
- checkReturn('returnInt3', commonMasks.uint31Type);
- checkReturn('returnInt4', commonMasks.uint31Type);
- checkReturn('returnInt5', commonMasks.uint31Type);
- checkReturn('returnInt6', new TypeMask.nonNullSubtype(
- compiler.coreClasses.intClass, compiler.world));
-
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
-
- checkReturn('returnDyn1', subclassOfInterceptor);
- checkReturn('returnDyn2', subclassOfInterceptor);
- checkReturn('returnDyn3', subclassOfInterceptor);
- checkReturn('returnDyn4', subclassOfInterceptor);
- checkReturn('returnDyn5', subclassOfInterceptor);
- checkReturn('returnDyn6', commonMasks.dynamicType);
- }));
+ var commonMasks = compiler.commonMasks;
+ var typesInferrer = compiler.globalInference.typesInferrer;
+
+ checkReturn(String name, type) {
+ var element = findElement(compiler, name);
+ Expect.equals(
+ type,
+ simplify(
+ typesInferrer.getReturnTypeOfElement(element), compiler));
+ }
+
+ checkReturn('returnInt1', commonMasks.uint31Type);
+ checkReturn('returnInt2', commonMasks.uint31Type);
+ checkReturn('returnInt3', commonMasks.uint31Type);
+ checkReturn('returnInt4', commonMasks.uint31Type);
+ checkReturn('returnInt5', commonMasks.uint31Type);
+ checkReturn(
+ 'returnInt6',
+ new TypeMask.nonNullSubtype(
+ compiler.coreClasses.intClass, compiler.world));
+
+ var subclassOfInterceptor =
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+
+ checkReturn('returnDyn1', subclassOfInterceptor);
+ checkReturn('returnDyn2', subclassOfInterceptor);
+ checkReturn('returnDyn3', subclassOfInterceptor);
+ checkReturn('returnDyn4', subclassOfInterceptor);
+ checkReturn('returnDyn5', subclassOfInterceptor);
+ checkReturn('returnDyn6', commonMasks.dynamicType);
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/simple_inferrer_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_unregister_call_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698