| OLD | NEW |
| 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 List<String> defaultTestSelectors = | 7 List<String> defaultTestSelectors = |
| 8 const ['samples', 'standalone', 'corelib', 'co19', 'language', | 8 const ['samples', 'standalone', 'corelib', 'co19', 'language', |
| 9 'isolate', 'stub-generator', 'vm']; | 9 'isolate', 'stub-generator', 'vm']; |
| 10 | 10 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 | 285 |
| 286 return [configuration]; | 286 return [configuration]; |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| 290 /** | 290 /** |
| 291 * Print out usage information. | 291 * Print out usage information. |
| 292 */ | 292 */ |
| 293 void _printHelp() { | 293 void _printHelp() { |
| 294 print('usage: dart_bin test.dart [options]\n'); | 294 print('usage: dart test.dart [options]\n'); |
| 295 print('Options:\n'); | 295 print('Options:\n'); |
| 296 for (var option in _options) { | 296 for (var option in _options) { |
| 297 print('${option.name}: ${option.description}.'); | 297 print('${option.name}: ${option.description}.'); |
| 298 for (var name in option.keys) { | 298 for (var name in option.keys) { |
| 299 assert(name.startsWith('-')); | 299 assert(name.startsWith('-')); |
| 300 var buffer = new StringBuffer();; | 300 var buffer = new StringBuffer();; |
| 301 buffer.add(name); | 301 buffer.add(name); |
| 302 if (option.type == 'bool') { | 302 if (option.type == 'bool') { |
| 303 assert(option.values.empty()); | 303 assert(option.values.empty()); |
| 304 } else { | 304 } else { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 333 if (option.keys.some((key) => key == name)) { | 333 if (option.keys.some((key) => key == name)) { |
| 334 return option; | 334 return option; |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 return null; | 337 return null; |
| 338 } | 338 } |
| 339 | 339 |
| 340 | 340 |
| 341 List<_TestOptionSpecification> _options; | 341 List<_TestOptionSpecification> _options; |
| 342 } | 342 } |
| OLD | NEW |