| Index: pkg/matcher/test/core_matchers_test.dart
|
| diff --git a/pkg/matcher/test/core_matchers_test.dart b/pkg/matcher/test/core_matchers_test.dart
|
| index 3f694f31c49a8739236d5b4a319ec217f0a7a786..c7644a292a37ef08bf26098214f7a097d535528c 100644
|
| --- a/pkg/matcher/test/core_matchers_test.dart
|
| +++ b/pkg/matcher/test/core_matchers_test.dart
|
| @@ -47,6 +47,24 @@ void main() {
|
| shouldPass(a, equals(b));
|
| });
|
|
|
| + test('equals with a set', () {
|
| + var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
| + var set1 = numbers.toSet();
|
| + numbers.shuffle();
|
| + var set2 = numbers.toSet();
|
| +
|
| + shouldPass(set2, equals(set1));
|
| + shouldPass(numbers, equals(set1));
|
| + shouldFail([1, 2, 3, 4, 5, 6, 7, 8, 9], equals(set1),
|
| + "Expected: ?:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n"
|
| + " Actual: [1, 2, 3, 4, 5, 6, 7, 8, 9]\n"
|
| + " Which: does not contain 10");
|
| + shouldFail([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], equals(set1),
|
| + "Expected: ?:[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n"
|
| + " Actual: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n"
|
| + " Which: larger than expected");
|
| + });
|
| +
|
| test('anything', () {
|
| var a = new Map();
|
| shouldPass(0, anything);
|
|
|