Unverified Commit 6bd68970 authored by Alexander Aprelev's avatar Alexander Aprelev Committed by GitHub

Run tests in dart2 mode. (#16675)

* Run tests in dart2 mode.

* Fix type check

* Drop --checked, leave --preview-dart-2

* Remove debugging leftovers.
parent 3a0aabc3
......@@ -71,6 +71,7 @@ Future<Null> _verifyInternationalizations() async {
final EvalResult genResult = await _evalCommand(
dart,
<String>[
'--preview-dart-2',
path.join('dev', 'tools', 'gen_localizations.dart'),
],
workingDirectory: flutterRoot,
......@@ -117,7 +118,8 @@ Future<Null> _analyzeRepo() async {
);
// Analyze all the sample code in the repo
await _runCommand(dart, <String>[path.join(flutterRoot, 'dev', 'bots', 'analyze-sample-code.dart')],
await _runCommand(dart,
<String>['--preview-dart-2', path.join(flutterRoot, 'dev', 'bots', 'analyze-sample-code.dart')],
workingDirectory: flutterRoot,
);
......@@ -128,7 +130,8 @@ Future<Null> _analyzeRepo() async {
);
// Try an analysis against a big version of the gallery.
await _runCommand(dart, <String>[path.join(flutterRoot, 'dev', 'tools', 'mega_gallery.dart')],
await _runCommand(dart,
<String>['--preview-dart-2', path.join(flutterRoot, 'dev', 'tools', 'mega_gallery.dart')],
workingDirectory: flutterRoot,
);
await _runFlutterAnalyze(path.join(flutterRoot, 'dev', 'benchmarks', 'mega_gallery'),
......@@ -391,7 +394,7 @@ Future<Null> _runAllDartTests(String workingDirectory, {
Map<String, String> environment,
List<String> options,
}) {
final List<String> args = <String>['--checked'];
final List<String> args = <String>['--preview-dart-2'];
if (options != null) {
args.addAll(options);
}
......
......@@ -28,7 +28,8 @@ String validateEnglishLocalizations(File file) {
continue;
final dynamic atResourceValue = bundle[atResourceId];
final Map<String, String> atResource = atResourceValue is Map ? atResourceValue : null;
final Map<String, dynamic> atResource =
atResourceValue is Map<String, dynamic> ? atResourceValue : null;
if (atResource == null) {
errorMessages.writeln('A map value was not specified for $atResourceId');
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment