| Index: pkg/unittest/test/matchers_test.dart
|
| ===================================================================
|
| --- pkg/unittest/test/matchers_test.dart (revision 18358)
|
| +++ pkg/unittest/test/matchers_test.dart (working copy)
|
| @@ -128,6 +128,8 @@
|
| shouldFail(doesNotThrow, throws,
|
| "Expected: throws an exception but: no exception.");
|
| shouldPass(doesThrow, throws);
|
| + shouldFail(true, throws,
|
| + "Expected: throws an exception but: not a Function or Future.");
|
| });
|
|
|
| test('throwsA', () {
|
| @@ -243,6 +245,15 @@
|
| "but: was <[0, 0]> with length of <2>.");
|
| shouldPass(b, hasLength(2));
|
| });
|
| +
|
| + test('type mismatch', () {
|
| + var a = new DateTime.utc(2000);
|
| + var b = a.toString();
|
| + shouldFail(a, equals(b),
|
| + "Expected: '2000-01-01 00:00:00.000Z' "
|
| + "but: expected String:'2000-01-01 00:00:00.000Z' "
|
| + "but was DateTime:<2000-01-01 00:00:00.000Z>.");
|
| + });
|
| });
|
|
|
| group('Numeric Matchers', () {
|
|
|