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

Unified Diff: pkg/args/test/args_test.dart

Issue 11575043: Convert the small packages in pkg to use "package:". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | pkg/fixnum/test/int_32_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/args/test/args_test.dart
diff --git a/pkg/args/test/args_test.dart b/pkg/args/test/args_test.dart
index 728ff7d7810437d96edaedeafd2885da257449b5..11627f3f8beec93af3d32110457f91c98781b20f 100644
--- a/pkg/args/test/args_test.dart
+++ b/pkg/args/test/args_test.dart
@@ -4,8 +4,7 @@
library args_test;
-import '../../../pkg/unittest/lib/unittest.dart';
-
+import 'package:unittest/unittest.dart';
import 'package:args/args.dart';
main() {
@@ -188,47 +187,47 @@ main() {
var args = parser.parse([]);
expect(a, isNull);
});
-
+
test('for multiple present, allowMultiple, options are invoked with '
'value as a list', () {
var a;
var parser = new ArgParser();
- parser.addOption('a', allowMultiple: true,
+ parser.addOption('a', allowMultiple: true,
callback: (value) => a = value);
-
+
var args = parser.parse(['--a=v', '--a=x']);
expect(a, equals(['v', 'x']));
});
-
+
test('for single present, allowMultiple, options are invoked with '
' value as a single element list', () {
var a;
var parser = new ArgParser();
parser.addOption('a', allowMultiple: true,
callback: (value) => a = value);
-
+
var args = parser.parse(['--a=v']);
expect(a, equals(['v']));
});
-
+
test('for absent, allowMultiple, options are invoked with default '
'value as a list.', () {
var a;
var parser = new ArgParser();
parser.addOption('a', allowMultiple: true, defaultsTo: 'v',
callback: (value) => a = value);
-
+
var args = parser.parse([]);
expect(a, equals(['v']));
});
-
+
test('for absent, allowMultiple, options are invoked with value '
'as an empty list.', () {
var a;
var parser = new ArgParser();
parser.addOption('a', allowMultiple: true,
callback: (value) => a = value);
-
+
var args = parser.parse([]);
expect(a, isEmpty);
});
« no previous file with comments | « no previous file | pkg/fixnum/test/int_32_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698