mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: improve coverage
This commit is contained in:
parent
d75acbfdd3
commit
d6eae1e9ed
71 changed files with 710 additions and 229 deletions
|
@ -69,12 +69,15 @@ void main() {
|
|||
odb.free();
|
||||
});
|
||||
|
||||
test('successfully packs into provided path', () {
|
||||
test('successfully packs into provided path with threads set', () {
|
||||
final odb = repo.odb;
|
||||
final objectsCount = odb.objects.length;
|
||||
Directory('${repo.workdir}test-pack').createSync();
|
||||
|
||||
final writtenCount = repo.pack(path: '${repo.workdir}test-pack');
|
||||
final writtenCount = repo.pack(
|
||||
path: '${repo.workdir}test-pack',
|
||||
threads: 1,
|
||||
);
|
||||
expect(writtenCount, objectsCount);
|
||||
expect(
|
||||
Directory('${repo.workdir}test-pack').listSync().isNotEmpty,
|
||||
|
@ -101,5 +104,11 @@ void main() {
|
|||
final writtenCount = repo.pack(packDelegate: packDelegate);
|
||||
expect(writtenCount, 18);
|
||||
});
|
||||
|
||||
test('returns string representation of PackBuilder object', () {
|
||||
final packbuilder = PackBuilder(repo);
|
||||
expect(packbuilder.toString(), contains('PackBuilder{'));
|
||||
packbuilder.free();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue