feat: add ability to compare objects

This commit is contained in:
Aleksey Kulikov 2022-05-10 16:12:21 +03:00
parent 5dfedadfe6
commit a14fe15a9c
45 changed files with 466 additions and 137 deletions

View file

@ -50,6 +50,7 @@ void main() {
expect(object.type, GitObject.blob);
expect(object.data, blobContent);
expect(object.size, 13);
expect(object, equals(repo.odb.read(repo[blobSha])));
});
test('throws when trying to read object and error occurs', () {
@ -115,5 +116,9 @@ void main() {
final object = repo.odb.read(repo[blobSha]);
expect(object.toString(), contains('OdbObject{'));
});
test('supports value comparison', () {
expect(repo.odb, equals(repo.odb));
});
});
}