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

Unified Diff: tests/compiler/dart2js/simple_inferrer_and_or_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_and_or_test.dart
diff --git a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
index e5a11bce438ef70af9cc3d70bb756fe65fe98526..ac2e682a613ccd7a1cda432db1590c8079cc434a 100644
--- a/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
+++ b/tests/compiler/dart2js/simple_inferrer_and_or_test.dart
@@ -92,32 +92,36 @@ main() {
}
""";
-
void main() {
Uri uri = new Uri(scheme: 'source');
var compiler = compilerFor(TEST, uri);
asyncTest(() => compiler.run(uri).then((_) {
- var typesInferrer = compiler.globalInference.typesInferrer;
-
- checkReturn(String name, type) {
- var element = findElement(compiler, name);
- Expect.equals(type,
- simplify(typesInferrer.getReturnTypeOfElement(element), compiler));
- }
-
- var subclassOfInterceptor =
- findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
-
- checkReturn('returnDyn1', subclassOfInterceptor);
- checkReturn('returnDyn2', subclassOfInterceptor);
- checkReturn('returnDyn3', subclassOfInterceptor);
- checkReturn('returnDyn4', compiler.commonMasks.dynamicType.nonNullable());
- checkReturn('returnDyn5', compiler.commonMasks.dynamicType.nonNullable());
- checkReturn('returnDyn6', compiler.commonMasks.dynamicType.nonNullable());
- checkReturn('returnDyn7', subclassOfInterceptor);
- checkReturn('returnDyn7b', subclassOfInterceptor);
- checkReturn('returnDyn8', subclassOfInterceptor);
- checkReturn('returnDyn9', subclassOfInterceptor);
- checkReturn('returnString', compiler.commonMasks.stringType);
- }));
+ var typesInferrer = compiler.globalInference.typesInferrer;
+
+ checkReturn(String name, type) {
+ var element = findElement(compiler, name);
+ Expect.equals(
+ type,
+ simplify(
+ typesInferrer.getReturnTypeOfElement(element), compiler));
+ }
+
+ var subclassOfInterceptor =
+ findTypeMask(compiler, 'Interceptor', 'nonNullSubclass');
+
+ checkReturn('returnDyn1', subclassOfInterceptor);
+ checkReturn('returnDyn2', subclassOfInterceptor);
+ checkReturn('returnDyn3', subclassOfInterceptor);
+ checkReturn(
+ 'returnDyn4', compiler.commonMasks.dynamicType.nonNullable());
+ checkReturn(
+ 'returnDyn5', compiler.commonMasks.dynamicType.nonNullable());
+ checkReturn(
+ 'returnDyn6', compiler.commonMasks.dynamicType.nonNullable());
+ checkReturn('returnDyn7', subclassOfInterceptor);
+ checkReturn('returnDyn7b', subclassOfInterceptor);
+ checkReturn('returnDyn8', subclassOfInterceptor);
+ checkReturn('returnDyn9', subclassOfInterceptor);
+ checkReturn('returnString', compiler.commonMasks.stringType);
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/simple_function_subtype_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_callers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698