refactor!: use IterableMixin where possible

This commit is contained in:
Aleksey Kulikov 2021-09-20 13:03:43 +03:00
parent 6845286af2
commit cf677e488a
8 changed files with 100 additions and 57 deletions

View file

@ -7,6 +7,7 @@ import 'helpers/util.dart';
void main() {
late Repository repo;
late RefLog reflog;
late Reference head;
final tmpDir = '${Directory.systemTemp.path}/reflog_testrepo/';
setUp(() async {
@ -18,12 +19,13 @@ void main() {
to: await Directory(tmpDir).create(),
);
repo = Repository.open(tmpDir);
reflog = RefLog(repo.head);
head = repo.head;
reflog = RefLog(head);
});
tearDown(() async {
repo.head.free();
reflog.free();
head.free();
repo.free();
await Directory(tmpDir).delete(recursive: true);
});
@ -33,7 +35,7 @@ void main() {
});
test('returns correct number of log entries', () {
expect(reflog.count, 4);
expect(reflog.length, 4);
});
test('returns the log message', () {