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

Unified Diff: test/args_test.dart

Issue 849023002: format code, removed unused variables and deprecated usage (Closed) Base URL: https://github.com/dart-lang/args.git@master
Patch Set: Created 5 years, 11 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 | « pubspec.yaml ('k') | test/command_parse_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/args_test.dart
diff --git a/test/args_test.dart b/test/args_test.dart
index 77c23c329311e5ac308400b03def18da6767226c..dd1634d189580e5b4a1d930b98b8d0d176ed4eb9 100644
--- a/test/args_test.dart
+++ b/test/args_test.dart
@@ -29,7 +29,7 @@ void main() {
});
test('throws ArgumentError if the abbreviation is longer '
- 'than one character', () {
+ 'than one character', () {
var parser = new ArgParser();
throwsIllegalArg(() => parser.addFlag('flummox', abbr: 'flu'));
});
@@ -37,7 +37,7 @@ void main() {
test('throws ArgumentError if a flag name is invalid', () {
var parser = new ArgParser();
- for(var name in _INVALID_OPTIONS) {
+ for (var name in _INVALID_OPTIONS) {
var reason = '${Error.safeToString(name)} is not valid';
throwsIllegalArg(() => parser.addFlag(name), reason: reason);
}
@@ -46,7 +46,7 @@ void main() {
test('accepts valid flag names', () {
var parser = new ArgParser();
- for(var name in _VALID_OPTIONS) {
+ for (var name in _VALID_OPTIONS) {
var reason = '${Error.safeToString(name)} is valid';
expect(() => parser.addFlag(name), returnsNormally, reason: reason);
}
@@ -73,7 +73,7 @@ void main() {
});
test('throws ArgumentError if the abbreviation is longer '
- 'than one character', () {
+ 'than one character', () {
var parser = new ArgParser();
throwsIllegalArg(() => parser.addOption('flummox', abbr: 'flu'));
});
@@ -85,7 +85,7 @@ void main() {
test('throws ArgumentError if the abbreviation is an invalid value', () {
var parser = new ArgParser();
- for(var name in _INVALID_OPTIONS.where((v) => v != null)) {
+ for (var name in _INVALID_OPTIONS.where((v) => v != null)) {
throwsIllegalArg(() => parser.addOption('flummox', abbr: name));
}
});
@@ -103,7 +103,7 @@ void main() {
test('throws ArgumentError if an option name is invalid', () {
var parser = new ArgParser();
- for(var name in _INVALID_OPTIONS) {
+ for (var name in _INVALID_OPTIONS) {
var reason = '${Error.safeToString(name)} is not valid';
throwsIllegalArg(() => parser.addOption(name), reason: reason);
}
@@ -112,7 +112,7 @@ void main() {
test('accepts valid option names', () {
var parser = new ArgParser();
- for(var name in _VALID_OPTIONS) {
+ for (var name in _VALID_OPTIONS) {
var reason = '${Error.safeToString(name)} is valid';
expect(() => parser.addOption(name), returnsNormally, reason: reason);
}
@@ -286,24 +286,28 @@ void main() {
}
const _INVALID_OPTIONS = const [
- ' ', '', '-', '--', '--foo',
- ' with space',
- 'with\ttab',
- 'with\rcarriage\rreturn',
- 'with\nline\nfeed',
- "'singlequotes'",
- '"doublequotes"',
- 'back\\slash',
- 'forward/slash'
+ ' ',
+ '',
+ '-',
+ '--',
+ '--foo',
+ ' with space',
+ 'with\ttab',
+ 'with\rcarriage\rreturn',
+ 'with\nline\nfeed',
+ "'singlequotes'",
+ '"doublequotes"',
+ 'back\\slash',
+ 'forward/slash'
];
const _VALID_OPTIONS = const [
- 'a' // One character.
- 'contains-dash',
- 'contains_underscore',
- 'ends-with-dash-',
- 'contains--doubledash--',
- '1starts-with-number',
- 'contains-a-1number',
- 'ends-with-a-number8'
+ 'a' // One character.
+ 'contains-dash',
Siggi Cherem (dart-lang) 2015/01/14 01:37:47 oh, weird, can you file a bug in dart_style about
kevmoo 2015/01/14 01:47:47 https://github.com/dart-lang/dart_style/issues/138
+ 'contains_underscore',
+ 'ends-with-dash-',
+ 'contains--doubledash--',
+ '1starts-with-number',
+ 'contains-a-1number',
+ 'ends-with-a-number8'
];
« no previous file with comments | « pubspec.yaml ('k') | test/command_parse_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698