More dart 2 fixes to fuchsia_tester.dart (#19846)

This commit is contained in:
Todd Volkert 2018-07-26 17:46:08 -07:00 committed by GitHub
parent 730a534fbb
commit 7ea164ecb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,12 +38,13 @@ void main(List<String> args) {
});
}
Iterable<String> _findTests(Directory directory) {
List<String> _findTests(Directory directory) {
return directory
.listSync(recursive: true, followLinks: false)
.where((FileSystemEntity entity) =>
entity.path.endsWith('_test.dart') && fs.isFileSync(entity.path))
.map((FileSystemEntity entity) => fs.path.absolute(entity.path));
.map((FileSystemEntity entity) => fs.path.absolute(entity.path))
.toList();
}
Future<Null> run(List<String> args) async {
@ -71,7 +72,7 @@ Future<Null> run(List<String> args) async {
Cache.flutterRoot = tempDirectory.path;
final Directory testDirectory =
fs.directory(argResults[_kOptionTestDirectory]);
final Iterable<String> tests = _findTests(testDirectory);
final List<String> tests = _findTests(testDirectory);
final List<String> testArgs = <String>[];
testArgs.add('--');