mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(repository)!: use Finalizer
to automatically free allocated memory (#51)
BREAKING CHANGE: Return value of identity getter changed from Map<String, String> to Identity
This commit is contained in:
parent
aef440e345
commit
4e55d0f06c
43 changed files with 109 additions and 151 deletions
|
@ -20,10 +20,6 @@ void main() {
|
|||
repo = Repository.open(p.join('test', 'assets', 'empty_bare.git'));
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
repo.free();
|
||||
});
|
||||
|
||||
test('opens successfully', () {
|
||||
expect(repo, isA<Repository>());
|
||||
});
|
||||
|
@ -52,10 +48,6 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
repo.free();
|
||||
});
|
||||
|
||||
test('opens standart repository from working directory successfully', () {
|
||||
expect(repo, isA<Repository>());
|
||||
});
|
||||
|
@ -89,12 +81,18 @@ void main() {
|
|||
|
||||
test('sets identity ', () {
|
||||
repo.setIdentity(name: 'name', email: 'email@email.com');
|
||||
expect(repo.identity, {'name': 'email@email.com'});
|
||||
|
||||
final identity = repo.identity;
|
||||
expect(identity.name, 'name');
|
||||
expect(identity.email, 'email@email.com');
|
||||
});
|
||||
|
||||
test('unsets identity', () {
|
||||
repo.setIdentity(name: null, email: null);
|
||||
expect(repo.identity, isEmpty);
|
||||
|
||||
final identity = repo.identity;
|
||||
expect(identity.name, '');
|
||||
expect(identity.email, '');
|
||||
});
|
||||
|
||||
test('checks if shallow clone', () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue