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

Side by Side Diff: tools/testing/dart/test_options.dart

Issue 8537010: Enable frong testing components. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("test_options_parser"); 5 #library("test_options_parser");
6 6
7 /** 7 /**
8 * Specification of a single test option. 8 * Specification of a single test option.
9 * 9 *
10 * The name of the specification is used as the key for the option in 10 * The name of the specification is used as the key for the option in
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 if ((i + 1) >= arguments.length) { 134 if ((i + 1) >= arguments.length) {
135 print('No value supplied for option $name'); 135 print('No value supplied for option $name');
136 return null; 136 return null;
137 } 137 }
138 value = arguments[++i]; 138 value = arguments[++i];
139 } else { 139 } else {
140 // The option name does not start with '-' or '--' so we 140 // The option name does not start with '-' or '--' so we
141 // assume that the rest of the arguments specify tests or test 141 // assume that the rest of the arguments specify tests or test
142 // suites to run. 142 // suites to run.
143 configuration['rest'] = arguments.getRange(i, numArguments - i); 143 configuration['rest'] = arguments.getRange(i, numArguments - i);
144 return configuration; 144 return _expandConfigurations(configuration);
145 } 145 }
146 // Find the option specification for the name. 146 // Find the option specification for the name.
147 var spec = _getSpecification(name); 147 var spec = _getSpecification(name);
148 if (spec == null) { 148 if (spec == null) {
149 print('Unknown test option $name'); 149 print('Unknown test option $name');
150 return null; 150 return null;
151 } 151 }
152 // Parse the value for the option. 152 // Parse the value for the option.
153 if (spec.type == 'bool') { 153 if (spec.type == 'bool') {
154 if (!value.isEmpty()) { 154 if (!value.isEmpty()) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (option.keys.some((key) => key == name)) { 300 if (option.keys.some((key) => key == name)) {
301 return option; 301 return option;
302 } 302 }
303 } 303 }
304 return null; 304 return null;
305 } 305 }
306 306
307 307
308 List<_TestOptionSpecification> _options; 308 List<_TestOptionSpecification> _options;
309 } 309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698