Chromium Code Reviews| Index: pkg/args/test/shared.dart |
| diff --git a/pkg/args/test/shared.dart b/pkg/args/test/shared.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3ceb4d53c14a9ef9a9ddc58123267a51c915a3c7 |
| --- /dev/null |
| +++ b/pkg/args/test/shared.dart |
| @@ -0,0 +1,12 @@ |
| +library args_test_shared; |
|
Bob Nystrom
2013/11/26 19:07:41
Couple of things:
- Add the copyright header abov
|
| + |
| +import 'package:unittest/unittest.dart'; |
| +import 'package:args/args.dart'; |
| + |
| +void throwsIllegalArg(function, {String reason: null}) { |
| + expect(function, throwsArgumentError, reason: reason); |
| +} |
| + |
| +void throwsFormat(ArgParser parser, List<String> args) { |
| + expect(() => parser.parse(args), throwsFormatException); |
| +} |