OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 library utils; |
| 6 |
| 7 import 'package:unittest/unittest.dart'; |
| 8 import 'package:args/args.dart'; |
| 9 |
| 10 void throwsIllegalArg(function, {String reason: null}) { |
| 11 expect(function, throwsArgumentError, reason: reason); |
| 12 } |
| 13 |
| 14 void throwsFormat(ArgParser parser, List<String> args) { |
| 15 expect(() => parser.parse(args), throwsFormatException); |
| 16 } |
OLD | NEW |