test: add more tests for throws and their messages

This commit is contained in:
Aleksey Kulikov 2021-10-19 17:16:39 +03:00
parent d6eae1e9ed
commit 127849519d
80 changed files with 2741 additions and 1501 deletions

View file

@ -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;
}