mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-07-04 22:19:26 -04:00
test: add more tests for throws and their messages
This commit is contained in:
parent
d6eae1e9ed
commit
127849519d
80 changed files with 2741 additions and 1501 deletions
|
@ -28,18 +28,9 @@ List<Map<String, Pointer>> list(Pointer<git_repository> repo) {
|
|||
nextError = libgit2.git_note_next(noteOid, annotatedOid, iterator.value);
|
||||
if (nextError >= 0) {
|
||||
final out = calloc<Pointer<git_note>>();
|
||||
final error = libgit2.git_note_read(out, repo, notesRef, annotatedOid);
|
||||
|
||||
libgit2.git_note_read(out, repo, notesRef, annotatedOid);
|
||||
calloc.free(noteOid);
|
||||
|
||||
if (error < 0) {
|
||||
calloc.free(out);
|
||||
calloc.free(annotatedOid);
|
||||
calloc.free(iterator);
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
} else {
|
||||
result.add({'note': out.value, 'annotatedOid': annotatedOid});
|
||||
}
|
||||
result.add({'note': out.value, 'annotatedOid': annotatedOid});
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue