Skip to content

Commit

Permalink
Restore tests but ignore violations
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Jan 26, 2024
1 parent f503c2f commit 30df06b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/extensions_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,28 @@ void main() {
});
});
});
group('of nullable', () {
group('.whereNotNull', () {
test('empty', () {
expect(iterable(<int?>[]).whereNotNull(),
isEmpty); // ignore: deprecated_member_use_from_same_package
});
test('single', () {
expect(iterable(<int?>[null]).whereNotNull(),
isEmpty); // ignore: deprecated_member_use_from_same_package
expect(iterable(<int?>[1]).whereNotNull(),
[1]); // ignore: deprecated_member_use_from_same_package
});
test('multiple', () {
expect(iterable(<int?>[1, 3, 5]).whereNotNull(),
[1, 3, 5]); // ignore: deprecated_member_use_from_same_package
expect(iterable(<int?>[null, null, null]).whereNotNull(),
isEmpty); // ignore: deprecated_member_use_from_same_package
expect(iterable(<int?>[1, null, 3, null, 5]).whereNotNull(),
[1, 3, 5]); // ignore: deprecated_member_use_from_same_package
});
});
});
group('of number', () {
group('.sum', () {
test('empty', () {
Expand Down

0 comments on commit 30df06b

Please sign in to comment.