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

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

Issue 185463004: Make _TestOptionSpecification take a named argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_options.dart
diff --git a/dart/tools/testing/dart/test_options.dart b/dart/tools/testing/dart/test_options.dart
index 3fe2903d767db3c3413ae3d2c921b584bcf83bce..0d3cbb749b6cba149590d398ed07676ba1129ddc 100644
--- a/dart/tools/testing/dart/test_options.dart
+++ b/dart/tools/testing/dart/test_options.dart
@@ -27,7 +27,7 @@ class _TestOptionSpecification {
this.keys,
this.values,
this.defaultValue,
- [type = 'string']) : this.type = type;
+ {this.type : 'string'});
String name;
String description;
List<String> keys;
@@ -120,35 +120,35 @@ class TestOptionsParser {
['--checked'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'host_checked',
'Run compiler in checked mode',
['--host-checked'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'minified',
'Enable minification in the compiler',
['--minified'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'csp',
'Run tests under Content Security Policy restrictions',
['--csp'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'timeout',
'Timeout in seconds',
['-t', '--timeout'],
[],
-1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'progress',
'Progress indication mode',
@@ -162,7 +162,7 @@ class TestOptionsParser {
['--failure-summary'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'step_name',
'Step name for use by -pbuildbot',
@@ -175,56 +175,56 @@ class TestOptionsParser {
['--report'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'tasks',
'The number of parallel tasks to run',
['-j', '--tasks'],
[],
Platform.numberOfProcessors,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'shards',
'The number of instances that the tests will be sharded over',
['--shards'],
[],
1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'shard',
'The index of this instance when running in sharded mode',
['--shard'],
[],
1,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'help',
'Print list of options',
['-h', '--help'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'verbose',
'Verbose output',
['-v', '--verbose'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'list',
'List tests only, do not run them',
['--list'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'time',
'Print timing information after running tests',
['--time'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'dart',
'Path to dart executable',
@@ -272,7 +272,7 @@ Note: currently only implemented for dart2js.''',
['--use-sdk'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'use_public_packages',
'For tests using packages: Use pub.dartlang.org packages '
@@ -280,16 +280,16 @@ Note: currently only implemented for dart2js.''',
['--use-public-packages'],
[],
false,
- 'bool'),
- new _TestOptionSpecification(
- 'use_repository_packages',
- 'For tests using packages: Use pub.dartlang.org packages '
- 'but use overrides for the packages available in the '
- 'repository.',
- ['--use-repository-packages'],
- [],
- false,
- 'bool'),
+ type: 'bool'),
+ new _TestOptionSpecification(
+ 'use_repository_packages',
+ 'For tests using packages: Use pub.dartlang.org packages '
+ 'but use overrides for the packages available in the '
+ 'repository.',
+ ['--use-repository-packages'],
+ [],
+ false,
+ type: 'bool'),
new _TestOptionSpecification(
'build_directory',
'The name of the build directory, where products are placed.',
@@ -302,23 +302,21 @@ Note: currently only implemented for dart2js.''',
['-n', '--nobatch'],
[],
false,
- 'bool'),
+ type: 'bool'),
new _TestOptionSpecification(
'append_logs',
'Do not delete old logs but rather append to them.',
['--append_logs'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'write_debug_log',
'Don\'t write debug messages to stdout but rather to a logfile.',
['--write-debug-log'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'write_test_outcome_log',
'Write the outcome of all tests executed to a '
@@ -326,16 +324,14 @@ Note: currently only implemented for dart2js.''',
['--write-test-outcome-log'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'clear_safari_cache',
'Clear the safari cache (i.e., delete it).',
['--clear_safari_cache'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'copy_coredumps',
'If we see a crash that we did not expect, copy the core dumps. '
@@ -343,8 +339,7 @@ Note: currently only implemented for dart2js.''',
['--copy-coredumps'],
[],
false,
- 'bool'
- ),
+ type: 'bool'),
new _TestOptionSpecification(
'local_ip',
'IP address the http servers should listen on.'
@@ -358,28 +353,28 @@ Note: currently only implemented for dart2js.''',
['--test_server_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_server_cross_origin_port',
'Port for test http server cross origin.',
['--test_server_cross_origin_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_driver_port',
'Port for http test driver server.',
['--test_driver_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'test_driver_error_port',
'Port for http test driver server errors.',
['--test_driver_error_port'],
[],
0,
- 'int'),
+ type: 'int'),
new _TestOptionSpecification(
'record_to_file',
'Records all the commands that need to be executed and writes it '
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698