mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Moar tests on Windows (#14148)
This commit is contained in:
parent
6da8ec6bd0
commit
bf7cc09625
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io' as io;
|
|
||||||
|
|
||||||
import 'package:args/command_runner.dart';
|
import 'package:args/command_runner.dart';
|
||||||
import 'package:flutter_tools/src/base/file_system.dart';
|
import 'package:flutter_tools/src/base/file_system.dart';
|
||||||
|
@ -212,11 +211,7 @@ void main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(pq): enable when sky_shell is available
|
await _runFlutterTest(projectDir, target: fs.path.join(projectDir.path, 'test', 'widget_test.dart'));
|
||||||
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'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generated Xcode settings
|
// Generated Xcode settings
|
||||||
final String xcodeConfigPath = fs.path.join('ios', 'Flutter', 'Generated.xcconfig');
|
final String xcodeConfigPath = fs.path.join('ios', 'Flutter', 'Generated.xcconfig');
|
||||||
|
|
|
@ -26,28 +26,28 @@ void main() {
|
||||||
testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async {
|
testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
return _testFile('exception_handling', automatedTestsDirectory, flutterTestDirectory);
|
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 {
|
testUsingContext('report a nice error when a guarded function was called without await', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
return _testFile('test_async_utils_guarded', automatedTestsDirectory, flutterTestDirectory);
|
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 {
|
testUsingContext('report a nice error when an async function was called without await', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
return _testFile('test_async_utils_unguarded', automatedTestsDirectory, flutterTestDirectory);
|
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 {
|
testUsingContext('report a nice error when a Ticker is left running', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
return _testFile('ticker', automatedTestsDirectory, flutterTestDirectory);
|
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 {
|
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');
|
final String missingDependencyTests = fs.path.join('..', '..', 'dev', 'missing_dependency_tests');
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
return _testFile('trivial', missingDependencyTests, missingDependencyTests);
|
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 {
|
testUsingContext('run a test when its name matches a regexp', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
|
@ -82,7 +82,7 @@ void main() {
|
||||||
expect(result.exitCode, 0);
|
expect(result.exitCode, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
}, skip: io.Platform.isWindows); // TODO(goderbauer): enable when sky_shell is available
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Null> _testFile(String testName, String workingDirectory, String testDirectory) async {
|
Future<Null> _testFile(String testName, String workingDirectory, String testDirectory) async {
|
||||||
|
|
Loading…
Reference in a new issue