mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: use Finalizer
to automatically free allocated memory for objects
BREAKING CHANGE: signature change for remote and repository callbacks during repository clone operation.
This commit is contained in:
parent
94c40f9a94
commit
b589097c8c
73 changed files with 1073 additions and 1618 deletions
|
@ -16,9 +16,6 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
signature.free();
|
||||
});
|
||||
group('Signature', () {
|
||||
test('creates with provided time and offset', () {
|
||||
expect(signature, isA<Signature>());
|
||||
|
@ -50,7 +47,6 @@ void main() {
|
|||
lessThan(5),
|
||||
);
|
||||
expect(sig.offset, isA<int>());
|
||||
sig.free();
|
||||
});
|
||||
|
||||
test('returns correct values', () {
|
||||
|
@ -66,9 +62,16 @@ void main() {
|
|||
email: email,
|
||||
time: time,
|
||||
);
|
||||
expect(signature == otherSignature, true);
|
||||
expect(signature, equals(otherSignature));
|
||||
});
|
||||
|
||||
otherSignature.free();
|
||||
test('manually releases allocated memory', () {
|
||||
final signature = Signature.create(
|
||||
name: name,
|
||||
email: email,
|
||||
time: time,
|
||||
);
|
||||
expect(() => signature.free(), returnsNormally);
|
||||
});
|
||||
|
||||
test('returns string representation of Signature object', () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue