Fix indentations of statements in BlockFunctionBody (#28933)
* fix indentof statements in BlockFunctionBody
* fix indentof statements in BlockFunctionBody in tests
diff --git a/packages/flutter_tools/test/commands/attach_test.dart b/packages/flutter_tools/test/commands/attach_test.dart
index f2a7020..693d71e 100644
--- a/packages/flutter_tools/test/commands/attach_test.dart
+++ b/packages/flutter_tools/test/commands/attach_test.dart
@@ -237,8 +237,8 @@
mockLogReader.addLine(
'Observatory listening on http://127.0.0.1:$devicePort');
});
- return mockLogReader;
- });
+ return mockLogReader;
+ });
final File foo = fs.file('lib/foo.dart')
..createSync();
diff --git a/packages/flutter_tools/test/commands/doctor_test.dart b/packages/flutter_tools/test/commands/doctor_test.dart
index 5329d47..3fe74bb 100644
--- a/packages/flutter_tools/test/commands/doctor_test.dart
+++ b/packages/flutter_tools/test/commands/doctor_test.dart
@@ -133,8 +133,7 @@
..environment = <String, String>{'http_proxy': 'fakeproxy.local'},
});
- testUsingContext('reports success when NO_PROXY is configured correctly',
- () async {
+ testUsingContext('reports success when NO_PROXY is configured correctly', () async {
final ValidationResult results = await ProxyValidator().validate();
final List<ValidationMessage> issues = results.messages
.where((ValidationMessage msg) => msg.isError || msg.isHint)
@@ -148,8 +147,7 @@
},
});
- testUsingContext('reports success when no_proxy is configured correctly',
- () async {
+ testUsingContext('reports success when no_proxy is configured correctly', () async {
final ValidationResult results = await ProxyValidator().validate();
final List<ValidationMessage> issues = results.messages
.where((ValidationMessage msg) => msg.isError || msg.isHint)
@@ -163,8 +161,7 @@
},
});
- testUsingContext('reports issues when NO_PROXY is missing localhost',
- () async {
+ testUsingContext('reports issues when NO_PROXY is missing localhost', () async {
final ValidationResult results = await ProxyValidator().validate();
final List<ValidationMessage> issues = results.messages
.where((ValidationMessage msg) => msg.isError || msg.isHint)
@@ -178,8 +175,7 @@
},
});
- testUsingContext('reports issues when NO_PROXY is missing 127.0.0.1',
- () async {
+ testUsingContext('reports issues when NO_PROXY is missing 127.0.0.1', () async {
final ValidationResult results = await ProxyValidator().validate();
final List<ValidationMessage> issues = results.messages
.where((ValidationMessage msg) => msg.isError || msg.isHint)
diff --git a/packages/flutter_tools/test/commands/ide_config_test.dart b/packages/flutter_tools/test/commands/ide_config_test.dart
index 4f4bf24..70348ea 100644
--- a/packages/flutter_tools/test/commands/ide_config_test.dart
+++ b/packages/flutter_tools/test/commands/ide_config_test.dart
@@ -23,10 +23,10 @@
Map<String, String> _getFilesystemContents([ Directory root ]) {
final String tempPath = tempDir.absolute.path;
final List<String> paths =
- (root ?? tempDir).listSync(recursive: true).map((FileSystemEntity entity) {
- final String relativePath = fs.path.relative(entity.path, from: tempPath);
- return relativePath;
- }).toList();
+ (root ?? tempDir).listSync(recursive: true).map((FileSystemEntity entity) {
+ final String relativePath = fs.path.relative(entity.path, from: tempPath);
+ return relativePath;
+ }).toList();
final Map<String, String> contents = <String, String>{};
for (String path in paths) {
final String absPath = fs.path.join(tempPath, path);
diff --git a/packages/flutter_tools/test/emulator_test.dart b/packages/flutter_tools/test/emulator_test.dart
index 2fdef5b..44a39bb 100644
--- a/packages/flutter_tools/test/emulator_test.dart
+++ b/packages/flutter_tools/test/emulator_test.dart
@@ -70,8 +70,7 @@
await expectEmulator('ios', <Emulator>[emulator3]);
});
- testUsingContext('create emulator with an empty name does not fail',
- () async {
+ testUsingContext('create emulator with an empty name does not fail', () async {
final CreateEmulatorResult res = await emulatorManager.createEmulator();
expect(res.success, equals(true));
}, overrides: <Type, Generator>{
@@ -80,8 +79,7 @@
AndroidSdk: () => mockSdk,
});
- testUsingContext('create emulator with a unique name does not throw',
- () async {
+ testUsingContext('create emulator with a unique name does not throw', () async {
final CreateEmulatorResult res =
await emulatorManager.createEmulator(name: 'test');
expect(res.success, equals(true));
@@ -101,9 +99,7 @@
AndroidSdk: () => mockSdk,
});
- testUsingContext(
- 'create emulator without a name but when default exists adds a suffix',
- () async {
+ testUsingContext('create emulator without a name but when default exists adds a suffix', () async {
// First will get default name.
CreateEmulatorResult res = await emulatorManager.createEmulator();
expect(res.success, equals(true));
diff --git a/packages/flutter_tools/test/flutter_manifest_test.dart b/packages/flutter_tools/test/flutter_manifest_test.dart
index 828bc6f..c2156bf 100644
--- a/packages/flutter_tools/test/flutter_manifest_test.dart
+++ b/packages/flutter_tools/test/flutter_manifest_test.dart
@@ -499,14 +499,15 @@
FileSystem filesystem,
dynamic testMethod(),
) {
- testUsingContext(description,
- () async {
- writeEmptySchemaFile(filesystem);
- testMethod();
- },
- overrides: <Type, Generator>{
- FileSystem: () => filesystem,
- },
+ testUsingContext(
+ description,
+ () async {
+ writeEmptySchemaFile(filesystem);
+ testMethod();
+ },
+ overrides: <Type, Generator>{
+ FileSystem: () => filesystem,
+ },
);
}
@@ -514,16 +515,20 @@
assertSchemaIsReadable();
});
- testUsingContextAndFs('Validate manifest on Posix FS',
- MemoryFileSystem(style: FileSystemStyle.posix), () {
- assertSchemaIsReadable();
- },
+ testUsingContextAndFs(
+ 'Validate manifest on Posix FS',
+ MemoryFileSystem(style: FileSystemStyle.posix),
+ () {
+ assertSchemaIsReadable();
+ },
);
- testUsingContextAndFs('Validate manifest on Windows FS',
- MemoryFileSystem(style: FileSystemStyle.windows), () {
- assertSchemaIsReadable();
- },
+ testUsingContextAndFs(
+ 'Validate manifest on Windows FS',
+ MemoryFileSystem(style: FileSystemStyle.windows),
+ () {
+ assertSchemaIsReadable();
+ },
);
});
diff --git a/packages/flutter_tools/test/integration/daemon_mode_test.dart b/packages/flutter_tools/test/integration/daemon_mode_test.dart
index 8771b60..c63fc33 100644
--- a/packages/flutter_tools/test/integration/daemon_mode_test.dart
+++ b/packages/flutter_tools/test/integration/daemon_mode_test.dart
@@ -47,18 +47,18 @@
.listen((String line) => stdout.add(line));
final Stream<Map<String, dynamic>> stream =
- stdout.stream.where((String line) {
- final Map<String, dynamic> response = parseFlutterResponse(line);
- // ignore 'Starting device daemon...'
- if (response == null) {
- return false;
- }
- // TODO(devoncarew): Remove this after #25440 lands.
- if (response['event'] == 'daemon.showMessage') {
- return false;
- }
- return true;
- }).map(parseFlutterResponse);
+ stdout.stream.where((String line) {
+ final Map<String, dynamic> response = parseFlutterResponse(line);
+ // ignore 'Starting device daemon...'
+ if (response == null) {
+ return false;
+ }
+ // TODO(devoncarew): Remove this after #25440 lands.
+ if (response['event'] == 'daemon.showMessage') {
+ return false;
+ }
+ return true;
+ }).map(parseFlutterResponse);
Map<String, dynamic> response = await stream.first;
expect(response['event'], 'daemon.connected');
diff --git a/packages/flutter_tools/test/ios/simulators_test.dart b/packages/flutter_tools/test/ios/simulators_test.dart
index ba2d8be..bc3ea07 100644
--- a/packages/flutter_tools/test/ios/simulators_test.dart
+++ b/packages/flutter_tools/test/ios/simulators_test.dart
@@ -305,21 +305,23 @@
testUsingContext('simulator can output `)`', () async {
when(mockProcessManager.start(any, environment: null, workingDirectory: null))
- .thenAnswer((Invocation invocation) {
- final Process mockProcess = MockProcess();
- when(mockProcess.stdout).thenAnswer((Invocation invocation) =>
- Stream<List<int>>.fromIterable(<List<int>>['''
+ .thenAnswer((Invocation invocation) {
+ final Process mockProcess = MockProcess();
+ when(mockProcess.stdout)
+ .thenAnswer((Invocation invocation) {
+ return Stream<List<int>>.fromIterable(<List<int>>['''
2017-09-13 15:26:57.228948-0700 localhost Runner[37195]: (Flutter) Observatory listening on http://127.0.0.1:57701/
2017-09-13 15:26:57.228948-0700 localhost Runner[37195]: (Flutter) ))))))))))
2017-09-13 15:26:57.228948-0700 localhost Runner[37195]: (Flutter) #0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)'''
- .codeUnits]));
- when(mockProcess.stderr)
- .thenAnswer((Invocation invocation) => const Stream<List<int>>.empty());
- // Delay return of exitCode until after stdout stream data, since it terminates the logger.
- when(mockProcess.exitCode)
- .thenAnswer((Invocation invocation) => Future<int>.delayed(Duration.zero, () => 0));
- return Future<Process>.value(mockProcess);
- });
+ .codeUnits]);
+ });
+ when(mockProcess.stderr)
+ .thenAnswer((Invocation invocation) => const Stream<List<int>>.empty());
+ // Delay return of exitCode until after stdout stream data, since it terminates the logger.
+ when(mockProcess.exitCode)
+ .thenAnswer((Invocation invocation) => Future<int>.delayed(Duration.zero, () => 0));
+ return Future<Process>.value(mockProcess);
+ });
final IOSSimulator device = IOSSimulator('123456', category: 'iOS 11.0');
final DeviceLogReader logReader = device.getLogReader(