Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1274)

Unified Diff: tools/testing/dart/compiler_configuration.dart

Issue 2903703002: Tighten types in test.dart even more. (Closed)
Patch Set: Play nicer with strong mode. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/co19_test_config.dart ('k') | tools/testing/dart/drt_updater.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index aa6486bbb73276d9fe30b55c44081876a0b35ebc..e63dbbb38d5390f69cb49d46509a125e5e6338d3 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -56,23 +56,23 @@ abstract class CompilerConfiguration {
// TODO(ahe): Remove this constructor and move the switch to
// test_options.dart. We probably want to store an instance of
// [CompilerConfiguration] in [configuration] there.
- factory CompilerConfiguration(Map configuration) {
- String compiler = configuration['compiler'];
+ factory CompilerConfiguration(Map<String, dynamic> configuration) {
+ var compiler = configuration['compiler'] as String;
// TODO(ahe): Move these booleans into a struction configuration object
// which can eventually completely replace the Map-based configuration
// object.
- bool isDebug = configuration['mode'] == 'debug';
- bool isChecked = configuration['checked'];
- bool isStrong = configuration['strong'];
- bool isHostChecked = configuration['host_checked'];
- bool useSdk = configuration['use_sdk'];
- bool isCsp = configuration['csp'];
- bool useBlobs = configuration['use_blobs'];
- bool hotReload = configuration['hot_reload'];
- bool hotReloadRollback = configuration['hot_reload_rollback'];
- bool useFastStartup = configuration['fast_startup'];
- bool useKernelInDart2js = configuration['dart2js_with_kernel'];
+ var isDebug = (configuration['mode'] as String) == 'debug';
+ var isChecked = configuration['checked'] as bool;
+ var isStrong = configuration['strong'] as bool;
+ var isHostChecked = configuration['host_checked'] as bool;
+ var useSdk = configuration['use_sdk'] as bool;
+ var isCsp = configuration['csp'] as bool;
+ var useBlobs = configuration['use_blobs'] as bool;
+ var hotReload = configuration['hot_reload'] as bool;
+ var hotReloadRollback = configuration['hot_reload_rollback'] as bool;
+ var useFastStartup = configuration['fast_startup'] as bool;
+ var useKernelInDart2js = configuration['dart2js_with_kernel'] as bool;
switch (compiler) {
case 'dart2analyzer':
@@ -100,7 +100,7 @@ abstract class CompilerConfiguration {
return new PrecompilerCompilerConfiguration(
isDebug: isDebug,
isChecked: isChecked,
- arch: configuration['arch'],
+ arch: configuration['arch'] as String,
useBlobs: useBlobs,
isAndroid: configuration['system'] == 'android');
case 'dartk':
@@ -116,7 +116,7 @@ abstract class CompilerConfiguration {
return new PrecompilerCompilerConfiguration(
isDebug: isDebug,
isChecked: isChecked,
- arch: configuration['arch'],
+ arch: configuration['arch'] as String,
useBlobs: useBlobs,
isAndroid: configuration['system'] == 'android',
useDfe: true);
« no previous file with comments | « tools/testing/dart/co19_test_config.dart ('k') | tools/testing/dart/drt_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698