From 7ea164ecb5a4a095cdac1defda1a0c56c920528e Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Thu, 26 Jul 2018 17:46:08 -0700 Subject: [PATCH] More dart 2 fixes to fuchsia_tester.dart (#19846) --- packages/flutter_tools/bin/fuchsia_tester.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/bin/fuchsia_tester.dart b/packages/flutter_tools/bin/fuchsia_tester.dart index 13961544e1f..3fa170bb251 100644 --- a/packages/flutter_tools/bin/fuchsia_tester.dart +++ b/packages/flutter_tools/bin/fuchsia_tester.dart @@ -38,12 +38,13 @@ void main(List args) { }); } -Iterable _findTests(Directory directory) { +List _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 run(List args) async { @@ -71,7 +72,7 @@ Future run(List args) async { Cache.flutterRoot = tempDirectory.path; final Directory testDirectory = fs.directory(argResults[_kOptionTestDirectory]); - final Iterable tests = _findTests(testDirectory); + final List tests = _findTests(testDirectory); final List testArgs = []; testArgs.add('--');