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

Unified Diff: tests/compiler/dart2js/uri_retention_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
« no previous file with comments | « tests/compiler/dart2js/uri_extras_test.dart ('k') | tests/compiler/dart2js/use_strict_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/uri_retention_test.dart
diff --git a/tests/compiler/dart2js/uri_retention_test.dart b/tests/compiler/dart2js/uri_retention_test.dart
index 8a7a47fbe72a0eec12a4e423df22a7ea3084ee66..d8414909e1f6aba2ecf1cdb767e243ef51827e72 100644
--- a/tests/compiler/dart2js/uri_retention_test.dart
+++ b/tests/compiler/dart2js/uri_retention_test.dart
@@ -9,8 +9,7 @@ import 'dart:async';
import 'package:expect/expect.dart';
import "package:async_helper/async_helper.dart";
-import 'memory_compiler.dart' show
- runCompiler, OutputCollector;
+import 'memory_compiler.dart' show runCompiler, OutputCollector;
Future<String> compileSources(sources, {bool minify, bool preserveUri}) async {
var options = [];
@@ -24,9 +23,9 @@ Future<String> compileSources(sources, {bool minify, bool preserveUri}) async {
return outputCollector.getOutput('', 'js');
}
-Future test(sources, { bool libName, bool fileName }) {
- return
- compileSources(sources, minify: false, preserveUri: false).then((output) {
+Future test(sources, {bool libName, bool fileName}) {
+ return compileSources(sources, minify: false, preserveUri: false)
+ .then((output) {
// Unminified the sources should always contain the library name and the
// file name.
Expect.isTrue(output.contains("main_lib"));
@@ -47,13 +46,14 @@ Future test(sources, { bool libName, bool fileName }) {
void main() {
asyncTest(() {
return new Future.value()
- .then((_) => test(MEMORY_SOURCE_FILES1, libName: false, fileName: false))
- .then((_) => test(MEMORY_SOURCE_FILES2, libName: true, fileName: false))
- .then((_) => test(MEMORY_SOURCE_FILES3, libName: true, fileName: true));
+ .then(
+ (_) => test(MEMORY_SOURCE_FILES1, libName: false, fileName: false))
+ .then((_) => test(MEMORY_SOURCE_FILES2, libName: true, fileName: false))
+ .then((_) => test(MEMORY_SOURCE_FILES3, libName: true, fileName: true));
});
}
-const MEMORY_SOURCE_FILES1 = const <String, String> {
+const MEMORY_SOURCE_FILES1 = const <String, String>{
'main.dart': """
library main_lib;
@@ -68,9 +68,8 @@ main() {
""",
};
-
// Requires the library name, but not the URIs.
-const MEMORY_SOURCE_FILES2 = const <String, String> {
+const MEMORY_SOURCE_FILES2 = const <String, String>{
'main.dart': """
library main_lib;
@@ -89,7 +88,7 @@ main() {
print(reflectClass(A).declarations.length);
}
""",
- 'file2.dart': """
+ 'file2.dart': """
library other_lib;
class B {
@@ -99,7 +98,7 @@ class B {
};
// Requires the uri (and will contain the library-name, too).
-const MEMORY_SOURCE_FILES3 = const <String, String> {
+const MEMORY_SOURCE_FILES3 = const <String, String>{
'main.dart': """
library main_lib;
« no previous file with comments | « tests/compiler/dart2js/uri_extras_test.dart ('k') | tests/compiler/dart2js/use_strict_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698