Index: tests/compiler/dart2js/serialization/helper.dart |
diff --git a/tests/compiler/dart2js/serialization/helper.dart b/tests/compiler/dart2js/serialization/helper.dart |
index 9c3204a4a2e5536aee80018d4953abdb12ab753b..cd6ecb2c2b326d6367d442122ed569f50326e96e 100644 |
--- a/tests/compiler/dart2js/serialization/helper.dart |
+++ b/tests/compiler/dart2js/serialization/helper.dart |
@@ -26,14 +26,14 @@ class Arguments { |
final String serializedDataFileName; |
final bool verbose; |
- const Arguments({ |
- this.filename, |
- this.start, |
- this.end, |
- this.loadSerializedData: false, |
- this.saveSerializedData: false, |
- this.serializedDataFileName: DEFAULT_DATA_FILE_NAME, |
- this.verbose: false}); |
+ const Arguments( |
+ {this.filename, |
+ this.start, |
+ this.end, |
+ this.loadSerializedData: false, |
+ this.saveSerializedData: false, |
+ this.serializedDataFileName: DEFAULT_DATA_FILE_NAME, |
+ this.verbose: false}); |
factory Arguments.from(List<String> arguments) { |
String filename; |
@@ -71,9 +71,7 @@ class Arguments { |
saveSerializedData: saveSerializedData); |
} |
- Future forEachTest( |
- SerializedData serializedData, |
- List<Test> tests, |
+ Future forEachTest(SerializedData serializedData, List<Test> tests, |
TestFunction testFunction) async { |
Uri entryPoint = Uri.parse('memory:main.dart'); |
int first = start ?? 0; |
@@ -106,13 +104,12 @@ class Arguments { |
} |
} |
-typedef Future TestFunction( |
- Uri entryPoint, |
+typedef Future TestFunction(Uri entryPoint, |
{Map<String, String> sourceFiles, |
- List<Uri> resolutionInputs, |
- int index, |
- Test test, |
- bool verbose}); |
+ List<Uri> resolutionInputs, |
+ int index, |
+ Test test, |
+ bool verbose}); |
Future<SerializedData> serializeDartCore( |
{Arguments arguments: const Arguments()}) { |
@@ -148,9 +145,9 @@ class SerializationResult { |
Future<SerializationResult> serialize(Uri entryPoint, |
{Map<String, String> memorySourceFiles: const <String, String>{}, |
- List<Uri> resolutionInputs: const <Uri>[], |
- Uri dataUri, |
- bool deserializeCompilationDataForTesting: false}) async { |
+ List<Uri> resolutionInputs: const <Uri>[], |
+ Uri dataUri, |
+ bool deserializeCompilationDataForTesting: false}) async { |
if (dataUri == null) { |
dataUri = Uri.parse('memory:${DEFAULT_DATA_FILE_NAME}'); |
} |
@@ -163,8 +160,8 @@ Future<SerializationResult> serialize(Uri entryPoint, |
compiler.serialization.deserializeCompilationDataForTesting = |
deserializeCompilationDataForTesting; |
await compiler.run(entryPoint); |
- SerializedData serializedData = new SerializedData( |
- dataUri, outputCollector.getOutput('', 'data')); |
+ SerializedData serializedData = |
+ new SerializedData(dataUri, outputCollector.getOutput('', 'data')); |
return new SerializationResult(compiler, serializedData); |
} |
@@ -226,10 +223,9 @@ Future<List<SerializedData>> preserializeData( |
Uri additionalDataUri = Uri.parse('memory:additional.data'); |
SerializedData additionalSerializedData; |
if (test.sourceFiles.isEmpty) { |
- SerializationResult result = await serialize( |
- uriList.first, |
+ SerializationResult result = await serialize(uriList.first, |
memorySourceFiles: sourceFiles, |
- resolutionInputs: serializedData.toUris(), |
+ resolutionInputs: serializedData.toUris(), |
dataUri: additionalDataUri); |
additionalSerializedData = result.serializedData; |
} else { |
@@ -247,8 +243,7 @@ Future<List<SerializedData>> preserializeData( |
libraries.add(compiler.libraryLoader.lookupLibrary(uri)); |
} |
additionalSerializedData = new SerializedData( |
- additionalDataUri, |
- outputCollector.getOutput('', 'data')); |
+ additionalDataUri, outputCollector.getOutput('', 'data')); |
} |
return <SerializedData>[serializedData, additionalSerializedData]; |
} |
@@ -304,7 +299,7 @@ Future measure(String title, String taskTitle, Future task()) async { |
stopwatch.stop(); |
int elapsedMilliseconds = stopwatch.elapsedMilliseconds; |
print('$taskTitle: $title: ${elapsedMilliseconds}ms'); |
- measurementResults.add( |
- new MeasurementResult(title, taskTitle, elapsedMilliseconds)); |
+ measurementResults |
+ .add(new MeasurementResult(title, taskTitle, elapsedMilliseconds)); |
return result; |
-} |
+} |