Skip to content

Commit

Permalink
✅ improve iterable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BirjuVachhani committed Jan 6, 2025
1 parent 53af0cb commit b930962
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/iterable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,15 @@ void main() {
// except tests
expect([1, 2, 3].except(2), containsAllInOrder(<int>[1, 3]));
expect([1, 2, 3].except(1, 5), containsAllInOrder(<int>[2, 3]));

expect([1, 2, 3].exceptAll([2]), containsAllInOrder(<int>[1, 3]));
expect([1, 2, 3].exceptAll([1, 5]), containsAllInOrder(<int>[2, 3]));
expect([1, 2, 3, 4, 5, 6].except(1, 2, 3, 4, 5, 6), isEmpty);
expect([4, 5, 6].except(1, 2, 3, 4, 5, 6), isEmpty);
expect([1, 2, 3, 'Hello', 5, 6].except(1, 2, 3, 'Hello'),
containsAllInOrder(<int>[5, 6]));

// exceptAll tests
expect([1, 2, 3].exceptAll([2]), containsAllInOrder(<int>[1, 3]));
expect([1, 2, 3].exceptAll([]), containsAllInOrder(<int>[1, 2, 3]));
expect([1, 2, 3].exceptAll([1, 5]), containsAllInOrder(<int>[2, 3]));
expect([1, 2, 3].exceptAll([]), containsAllInOrder(<int>[1, 2, 3]));

// containsAll tests
expect([1, 2, 3].containsAll([1, 2]), isTrue);
Expand Down

0 comments on commit b930962

Please sign in to comment.