mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
20 lines
517 B
Dart
20 lines
517 B
Dart
import 'package:nc_photos/iterator_extension.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group("iterator_extension", () {
|
|
group("IteratorExtionsion", () {
|
|
test("iterate", () {
|
|
final it = [1, 2, 3, 4, 5].iterator;
|
|
final result = <int>[];
|
|
it.iterate((obj) => result.add(obj));
|
|
expect(result, [1, 2, 3, 4, 5]);
|
|
});
|
|
|
|
test("toList", () {
|
|
final it = [1, 2, 3, 4, 5].iterator;
|
|
expect(it.toList(), [1, 2, 3, 4, 5]);
|
|
});
|
|
});
|
|
});
|
|
}
|