Skip to content

Commit

Permalink
Add changelog, replace in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natebosch committed Sep 27, 2024
1 parent 907d73c commit 643884b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions pkgs/checks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Always wrap Condition descriptions in angle brackets.
- Add `containsMatchingInOrder` and `containsEqualInOrder` to replace the
combined functionality in `containsInOrder`.
- Replace `pairwiseComparesTo` with `pairwiseMatches`.

## 0.3.0

Expand Down
10 changes: 5 additions & 5 deletions pkgs/checks/test/extensions/iterable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ void main() {
});
});

group('pairwiseComparesTo', () {
group('pairwiseMatches', () {
test('succeeds for the happy path', () {
check(_testIterable).pairwiseComparesTo([1, 2],
check(_testIterable).pairwiseMatches([1, 2],
(expected) => (it) => it.isLessThan(expected), 'is less than');
});
test('fails for mismatched element', () async {
check(_testIterable).isRejectedBy(
(it) => it.pairwiseComparesTo([1, 1],
(it) => it.pairwiseMatches([1, 1],
(expected) => (it) => it.isLessThan(expected), 'is less than'),
which: [
'does not have an element at index 1 that:',
Expand All @@ -259,15 +259,15 @@ void main() {
});
test('fails for too few elements', () {
check(_testIterable).isRejectedBy(
(it) => it.pairwiseComparesTo([1, 2, 3],
(it) => it.pairwiseMatches([1, 2, 3],
(expected) => (it) => it.isLessThan(expected), 'is less than'),
which: [
'has too few elements, there is no element to match at index 2'
]);
});
test('fails for too many elements', () {
check(_testIterable).isRejectedBy(
(it) => it.pairwiseComparesTo([1],
(it) => it.pairwiseMatches([1],
(expected) => (it) => it.isLessThan(expected), 'is less than'),
which: ['has too many elements, expected exactly 1']);
});
Expand Down

0 comments on commit 643884b

Please sign in to comment.