some whitespace cleanup (#14443)

This commit is contained in:
Alexandre Ardhuin
2018-02-02 23:27:29 +01:00
committed by GitHub
parent 688a571c71
commit c02b6a8bcf
158 changed files with 340 additions and 340 deletions

View File

@@ -16,7 +16,7 @@ import 'package:test/test.dart';
import 'src/common.dart';
import 'src/context.dart';
void main() {
void main() {
setUpAll(() {
Cache.flutterRoot = getFlutterRoot();
});

View File

@@ -15,7 +15,7 @@ import 'package:test/test.dart';
import 'src/common.dart';
import 'src/context.dart';
void main() {
void main() {
// These tests do not use a memory file system because we want to ensure that
// asset bundles work correctly on Windows and Posix systems.
Directory tempDir;

View File

@@ -11,7 +11,7 @@ import 'package:test/test.dart';
import 'src/common.dart';
import 'src/context.dart';
void main() {
void main() {
group('Assets', () {
final String dataPath = fs.path.join(
getFlutterRoot(),

View File

@@ -21,12 +21,12 @@ void main() {
testUsingContext('recursively creates a directory if it does not exist', () async {
ensureDirectoryExists('foo/bar/baz.flx');
expect(fs.isDirectorySync('foo/bar'), true);
}, overrides: <Type, Generator>{ FileSystem: () => fs } );
}, overrides: <Type, Generator>{ FileSystem: () => fs });
testUsingContext('throws tool exit on failure to create', () async {
fs.file('foo').createSync();
expect(() => ensureDirectoryExists('foo/bar.flx'), throwsToolExit());
}, overrides: <Type, Generator>{ FileSystem: () => fs } );
}, overrides: <Type, Generator>{ FileSystem: () => fs });
});
group('copyDirectorySync', () {

View File

@@ -82,7 +82,7 @@ void main() {
expect(flattenNameSubdirs(Uri.parse('http://flutter.io/foo/bar')), 'flutter.io/foo/bar');
expect(flattenNameSubdirs(Uri.parse('http://docs.flutter.io/foo/bar')), 'docs.flutter.io/foo/bar');
expect(flattenNameSubdirs(Uri.parse('https://www.flutter.io')), 'www.flutter.io');
}, overrides: <Type, Generator>{
}, overrides: <Type, Generator>{
FileSystem: () => new MockFileSystem(),
});
}

View File

@@ -26,7 +26,7 @@ void main() {
testUsingContext('not have extraneous error messages', () async {
Cache.flutterRoot = '../..';
return _testFile('trivial_widget', automatedTestsDirectory, flutterTestDirectory, exitCode: isZero);
}, skip: io.Platform.isLinux); // Flutter on Linux sometimes has problems with font resolution (#7224)
}, skip: io.Platform.isLinux); // Flutter on Linux sometimes has problems with font resolution (#7224)
testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async {
Cache.flutterRoot = '../..';

View File

@@ -9,7 +9,7 @@ import 'package:test/test.dart';
import 'src/common.dart';
import 'src/context.dart';
void main() {
void main() {
group('DartDependencySetBuilder', () {
final String dataPath = fs.path.join(
getFlutterRoot(),

View File

@@ -12,7 +12,7 @@ import 'package:test/test.dart';
import 'src/common.dart';
import 'src/context.dart';
void main() {
void main() {
group('DependencyChecker', () {
final String dataPath = fs.path.join(
getFlutterRoot(),
@@ -96,7 +96,7 @@ void main() {
final Directory destinationPath = fs.systemTempDirectory.createTempSync('dependency_checker_test_');
// Copy the golden input and let the test run in an isolated temporary in-memory file system.
const LocalFileSystem localFileSystem = const LocalFileSystem();
final Directory sourcePath = localFileSystem.directory(localFileSystem.path.join(dataPath, 'changed_sdk_location'));
final Directory sourcePath = localFileSystem.directory(localFileSystem.path.join(dataPath, 'changed_sdk_location'));
copyDirectorySync(sourcePath, destinationPath);
fs.currentDirectory = destinationPath;

View File

@@ -477,7 +477,7 @@ Future<Null> _createPackage(FileSystem fs, String pkgName, String pkgFileName, {
if (doubleSlash) {
// Force two separators into the path.
final String doubleSlash = fs.path.separator + fs.path.separator;
pkgFilePath = pkgTempDir.path + doubleSlash + fs.path.join(pkgName, 'lib', pkgFileName);
pkgFilePath = pkgTempDir.path + doubleSlash + fs.path.join(pkgName, 'lib', pkgFileName);
}
final File pkgFile = fs.file(pkgFilePath);
await pkgFile.parent.create(recursive: true);

View File

@@ -7,7 +7,7 @@ import 'package:test/test.dart';
import 'src/context.dart';
void main() {
void main() {
group('validateReloadReport', () {
testUsingContext('invalid', () async {
expect(HotRunner.validateReloadReport(<String, dynamic>{}), false);

View File

@@ -256,8 +256,8 @@ class TestCocoaPods extends CocoaPods {
}
final ProcessResult exitsHappy = new ProcessResult(
1, // pid
0, // exitCode
'', // stdout
'', // stderr
1, // pid
0, // exitCode
'', // stdout
'', // stderr
);

View File

@@ -96,8 +96,8 @@ void main() {
when(mockProcessManager.runSync(
argThat(contains('find-identity')), environment: any, workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)"
1 valid identities found''',
@@ -108,8 +108,8 @@ void main() {
environment: any,
workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'This is a mock certificate',
'',
));
@@ -151,8 +151,8 @@ void main() {
when(mockProcessManager.runSync(
argThat(contains('find-identity')), environment: any, workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)"
2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)"
@@ -167,8 +167,8 @@ void main() {
environment: any,
workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'This is a mock certificate',
'',
));
@@ -221,8 +221,8 @@ void main() {
when(mockProcessManager.runSync(
argThat(contains('find-identity')), environment: any, workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)"
2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)"
@@ -237,8 +237,8 @@ void main() {
environment: any,
workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'This is a mock certificate',
'',
));
@@ -285,8 +285,8 @@ void main() {
when(mockProcessManager.runSync(
argThat(contains('find-identity')), environment: any, workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)"
2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)"
@@ -299,8 +299,8 @@ void main() {
environment: any,
workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'This is a mock certificate',
'',
));
@@ -351,8 +351,8 @@ void main() {
when(mockProcessManager.runSync(
argThat(contains('find-identity')), environment: any, workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Profile 1 (1111AAAA11)"
2) da4b9237bacccdf19c0760cab7aec4a8359010b0 "iPhone Developer: Profile 2 (2222BBBB22)"
@@ -367,8 +367,8 @@ void main() {
environment: any,
workingDirectory: any,
)).thenReturn(new ProcessResult(
1, // pid
0, // exitCode
1, // pid
0, // exitCode
'This is a mock certificate',
'',
));
@@ -415,17 +415,17 @@ void main() {
}
final ProcessResult exitsHappy = new ProcessResult(
1, // pid
0, // exitCode
'', // stdout
'', // stderr
1, // pid
0, // exitCode
'', // stdout
'', // stderr
);
final ProcessResult exitsFail = new ProcessResult(
2, // pid
1, // exitCode
'', // stdout
'', // stderr
2, // pid
1, // exitCode
'', // stdout
'', // stderr
);
class MockProcessManager extends Mock implements ProcessManager {}

View File

@@ -289,10 +289,10 @@ void main() {
}
final ProcessResult exitsHappy = new ProcessResult(
1, // pid
0, // exitCode
'', // stdout
'', // stderr
1, // pid
0, // exitCode
'', // stdout
'', // stderr
);
class MockIMobileDevice extends IMobileDevice {

View File

@@ -81,7 +81,7 @@ void main() {
testUsingContext('idevicescreenshot captures and returns screenshot', () async {
when(mockOutputFile.path).thenReturn(outputPath);
when(mockProcessManager.run(any, environment: null, workingDirectory: null)).thenAnswer(
when(mockProcessManager.run(any, environment: null, workingDirectory: null)).thenAnswer(
(Invocation invocation) => new Future<ProcessResult>.value(new ProcessResult(4, 0, '', '')));
await iMobileDevice.takeScreenshot(mockOutputFile);

View File

@@ -154,7 +154,7 @@ void main() {
mockProcessManager = new MockProcessManager();
// Let everything else return exit code 0 so process.dart doesn't crash.
when(
mockProcessManager.run(any, environment: null, workingDirectory: null)
mockProcessManager.run(any, environment: null, workingDirectory: null)
).thenAnswer((Invocation invocation) =>
new Future<ProcessResult>.value(new ProcessResult(2, 0, '', ''))
);

View File

@@ -53,7 +53,7 @@ void testReplay(
/// be running in a test via [testReplay].
///
/// [command] should be the list of arguments that are passed to the `flutter`
/// command-line tool. For example:
/// command-line tool. For example:
///
/// ```
/// <String>[

View File

@@ -55,5 +55,5 @@ void main() {
fs.directory(fs.path.join(root, 'dev', 'tools', 'aatool')).path,
fs.directory(fs.path.join(root, 'dev', 'tools')).path,
]);
}, overrides: <Type, Generator>{ FileSystem: () => fs } );
}, overrides: <Type, Generator>{ FileSystem: () => fs });
}