OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:args/args.dart'; | 7 import 'package:args/args.dart'; |
8 import 'package:boolean_selector/boolean_selector.dart'; | 8 import 'package:boolean_selector/boolean_selector.dart'; |
9 | 9 |
10 import '../../backend/test_platform.dart'; | 10 import '../../backend/test_platform.dart'; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 parser.addSeparator("======== Output"); | 89 parser.addSeparator("======== Output"); |
90 parser.addOption("reporter", | 90 parser.addOption("reporter", |
91 abbr: 'r', | 91 abbr: 'r', |
92 help: 'The runner used to print test results.', | 92 help: 'The runner used to print test results.', |
93 defaultsTo: defaultReporter, | 93 defaultsTo: defaultReporter, |
94 allowed: allReporters, | 94 allowed: allReporters, |
95 allowedHelp: { | 95 allowedHelp: { |
96 'compact': 'A single line, updated continuously.', | 96 'compact': 'A single line, updated continuously.', |
97 'expanded': 'A separate line for each update.', | 97 'expanded': 'A separate line for each update.', |
98 'json': 'A machine-readable format (see https://goo.gl/0HRhdZ).' | 98 'json': 'A machine-readable format (see https://goo.gl/gBsV1a).' |
99 }); | 99 }); |
100 parser.addFlag("verbose-trace", negatable: false, | 100 parser.addFlag("verbose-trace", negatable: false, |
101 help: 'Whether to emit stack traces with core library frames.'); | 101 help: 'Whether to emit stack traces with core library frames.'); |
102 parser.addFlag("js-trace", negatable: false, | 102 parser.addFlag("js-trace", negatable: false, |
103 help: 'Whether to emit raw JavaScript stack traces for browser tests.'); | 103 help: 'Whether to emit raw JavaScript stack traces for browser tests.'); |
104 parser.addFlag("color", | 104 parser.addFlag("color", |
105 help: 'Whether to use terminal colors.\n(auto-detected by default)'); | 105 help: 'Whether to use terminal colors.\n(auto-detected by default)'); |
106 | 106 |
107 /// The following options are used only by the internal Google test runner. | 107 /// The following options are used only by the internal Google test runner. |
108 /// They're hidden and not supported as stable API surface outside Google. | 108 /// They're hidden and not supported as stable API surface outside Google. |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 /// information. | 232 /// information. |
233 /*=T*/ _wrapFormatException/*<T>*/(String name, /*=T*/ parse()) { | 233 /*=T*/ _wrapFormatException/*<T>*/(String name, /*=T*/ parse()) { |
234 try { | 234 try { |
235 return parse(); | 235 return parse(); |
236 } on FormatException catch (error) { | 236 } on FormatException catch (error) { |
237 throw new FormatException('Couldn\'t parse --$name "${_options[name]}": ' | 237 throw new FormatException('Couldn\'t parse --$name "${_options[name]}": ' |
238 '${error.message}'); | 238 '${error.message}'); |
239 } | 239 } |
240 } | 240 } |
241 } | 241 } |
OLD | NEW |