Skip to content

Commit b1ad898

Browse files
committed
test: Add ListChecks to stdlib_checks.dart, with [] operator
1 parent c148e42 commit b1ad898

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/stdlib_checks.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import 'dart:convert';
99
import 'package:checks/checks.dart';
1010
import 'package:http/http.dart' as http;
1111

12+
extension ListChecks<T> on Subject<List<T>> {
13+
Subject<T> operator [](int index) => has((l) => l[index], '[$index]');
14+
}
15+
1216
extension NullableMapChecks<K, V> on Subject<Map<K, V>?> {
1317
void deepEquals(Map<Object?, Object?>? expected) {
1418
if (expected == null) {

0 commit comments

Comments
 (0)