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 339c39d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions test/extensions_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,53 @@ void main() {
});
});
});
group('of nullable', () {
group('.whereNotNull', () {
test('empty', () {
expect(
iterable(<int?>[])
.whereNotNull(), // ignore: deprecated_member_use_from_same_package
isEmpty);
});
test('single', () {
expect(
iterable(<int?>[
null
]).whereNotNull(), // ignore: deprecated_member_use_from_same_package
isEmpty);
expect(
iterable(<int?>[
1
]).whereNotNull(), // ignore: deprecated_member_use_from_same_package
[1]);
});
test('multiple', () {
expect(
iterable(<int?>[
1,
3,
5
]).whereNotNull(), // ignore: deprecated_member_use_from_same_package
[1, 3, 5]);
expect(
iterable(<int?>[
null,
null,
null
]).whereNotNull(), // ignore: deprecated_member_use_from_same_package
isEmpty);
expect(
iterable(<int?>[
1,
null,
3,
null,
5
]).whereNotNull(), // ignore: deprecated_member_use_from_same_package
[1, 3, 5]);
});
});
});
group('of number', () {
group('.sum', () {
test('empty', () {
Expand Down

0 comments on commit 339c39d

Please sign in to comment.