@@ -93,26 +93,27 @@ enum _OptionValueType { bool, int, string }
93
93
class OptionsParser {
94
94
static final List <_Option > _options = [
95
95
_Option ('mode' , 'Mode in which to run the tests.' ,
96
- abbr: 'm' , values: ['all' ]..addAll (Mode .names)),
97
- _Option ('sanitizer' , 'Sanitizer in which to run the tests.' ,
98
- defaultsTo: Sanitizer .none.name,
99
- values: ['all' ]..addAll (Sanitizer .names)),
96
+ abbr: 'm' , values: ['all' , ...Mode .names]),
100
97
_Option (
101
98
'compiler' ,
102
99
'''How the Dart code should be compiled or statically processed.
103
-
104
- none: Do not compile the Dart code.
105
- precompiler: Compile into AOT snapshot before running the test.
106
- dart2js: Compile to JavaScript using dart2js.
107
- dart2analyzer: Perform static analysis on Dart code using the analyzer.
108
- compareAnalyzerCfe: Compare analyzer and common front end representations.
109
- app_jit: Compile the Dart code into an app snapshot.
110
- app_jitk: Compile the Dart code into Kernel and then into an app snapshot.
111
- dartk: Compile the Dart code into Kernel before running test.
112
- dartkb: Compile the Dart code into Kernel with bytecode before running test.
113
- dartkp: Compile the Dart code into Kernel and then Kernel into AOT
114
- snapshot before running the test.
115
- spec_parser: Parse Dart code using the specification parser.''' ,
100
+ none: Do not compile the Dart code.
101
+ dart2js: Compile to JavaScript using dart2js.
102
+ dart2analyzer: Perform static analysis on Dart code using the analyzer.
103
+ compare_analyzer_cfe: Compare analyzer and common front end representations.
104
+ dartdevc: Compile to JavaScript using dart2js.
105
+ dartdevk: Compile to JavaScript using dartdevk.
106
+ app_jitk: Compile the Dart code into Kernel and then into an app
107
+ snapshot.
108
+ dartk: Compile the Dart code into Kernel before running test.
109
+ dartkb: Compile the Dart code into Kernel with bytecode before
110
+ running test.
111
+ dartkp: Compile the Dart code into Kernel and then Kernel into
112
+ AOT snapshot before running the test.
113
+ spec_parser: Parse Dart code using the specification parser.
114
+
115
+ fasta: Compile using CFE for errors, but do not run.
116
+ ''' ,
116
117
abbr: 'c' ,
117
118
values: Compiler .names),
118
119
_Option (
@@ -149,14 +150,16 @@ ia32, x64
149
150
arm, armv6, arm64,
150
151
simarm, simarmv6, simarm64, arm_x64''' ,
151
152
abbr: 'a' ,
152
- values: ['all' ].. addAll ( Architecture .names) ,
153
+ values: ['all' , ... Architecture .names] ,
153
154
defaultsTo: Architecture .x64.name,
154
155
hide: true ),
155
156
_Option ('system' , 'The operating system to run tests on.' ,
156
157
abbr: 's' ,
157
158
values: System .names,
158
159
defaultsTo: Platform .operatingSystem,
159
160
hide: true ),
161
+ _Option ('sanitizer' , 'Sanitizer in which to run the tests.' ,
162
+ defaultsTo: Sanitizer .none.name, values: ['all' , ...Sanitizer .names]),
160
163
_Option (
161
164
'named_configuration' ,
162
165
'''The named test configuration that supplies the values for all
@@ -675,16 +678,14 @@ compiler.''',
675
678
}
676
679
677
680
var runtimeNames = data["runtime" ] as String ;
678
- var runtimes = < Runtime > [];
679
- if (runtimeNames != null ) {
680
- runtimes.addAll (runtimeNames.split ("," ).map (Runtime .find));
681
- }
681
+ var runtimes = [
682
+ if (runtimeNames != null ) ...runtimeNames.split ("," ).map (Runtime .find)
683
+ ];
682
684
683
685
var compilerNames = data["compiler" ] as String ;
684
- var compilers = < Compiler > [];
685
- if (compilerNames != null ) {
686
- compilers.addAll (compilerNames.split ("," ).map (Compiler .find));
687
- }
686
+ var compilers = [
687
+ if (compilerNames != null ) ...compilerNames.split ("," ).map (Compiler .find)
688
+ ];
688
689
689
690
// Pick default compilers or runtimes if only one or the other is provided.
690
691
if (runtimes.isEmpty) {
0 commit comments