From bf7cc096252df6fa077694072296ce5ecf3ba502 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 17 Jan 2018 16:08:07 -0800 Subject: [PATCH] Moar tests on Windows (#14148) --- .../flutter_tools/test/commands/create_test.dart | 7 +------ packages/flutter_tools/test/commands/test_test.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index aa388bd7021..53c77b105fa 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart @@ -4,7 +4,6 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io' as io; import 'package:args/command_runner.dart'; import 'package:flutter_tools/src/base/file_system.dart'; @@ -212,11 +211,7 @@ void main() { } } - // TODO(pq): enable when sky_shell is available - if (!io.Platform.isWindows) { - // Verify that the sample widget test runs cleanly. - await _runFlutterTest(projectDir, target: fs.path.join(projectDir.path, 'test', 'widget_test.dart')); - } + await _runFlutterTest(projectDir, target: fs.path.join(projectDir.path, 'test', 'widget_test.dart')); // Generated Xcode settings final String xcodeConfigPath = fs.path.join('ios', 'Flutter', 'Generated.xcconfig'); diff --git a/packages/flutter_tools/test/commands/test_test.dart b/packages/flutter_tools/test/commands/test_test.dart index 38e966248e5..1177096d18f 100644 --- a/packages/flutter_tools/test/commands/test_test.dart +++ b/packages/flutter_tools/test/commands/test_test.dart @@ -26,28 +26,28 @@ void main() { testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async { Cache.flutterRoot = '../..'; return _testFile('exception_handling', automatedTestsDirectory, flutterTestDirectory); - }); + }, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output testUsingContext('report a nice error when a guarded function was called without await', () async { Cache.flutterRoot = '../..'; return _testFile('test_async_utils_guarded', automatedTestsDirectory, flutterTestDirectory); - }); + }, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output testUsingContext('report a nice error when an async function was called without await', () async { Cache.flutterRoot = '../..'; return _testFile('test_async_utils_unguarded', automatedTestsDirectory, flutterTestDirectory); - }); + }, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output testUsingContext('report a nice error when a Ticker is left running', () async { Cache.flutterRoot = '../..'; return _testFile('ticker', automatedTestsDirectory, flutterTestDirectory); - }); + }, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output testUsingContext('report a nice error when a pubspec.yaml is missing a flutter_test dependency', () async { final String missingDependencyTests = fs.path.join('..', '..', 'dev', 'missing_dependency_tests'); Cache.flutterRoot = '../..'; return _testFile('trivial', missingDependencyTests, missingDependencyTests); - }); + }, skip: io.Platform.isWindows); // Dart on Windows has trouble with unicode characters in output testUsingContext('run a test when its name matches a regexp', () async { Cache.flutterRoot = '../..'; @@ -82,7 +82,7 @@ void main() { expect(result.exitCode, 0); }); - }, skip: io.Platform.isWindows); // TODO(goderbauer): enable when sky_shell is available + }); } Future _testFile(String testName, String workingDirectory, String testDirectory) async {