mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 20:59:08 -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
|
@ -1,20 +1,11 @@
|
|||
import 'dart:ffi';
|
||||
import '../error.dart';
|
||||
import 'libgit2_bindings.dart';
|
||||
import '../util.dart';
|
||||
|
||||
/// Suggests that the given refdb compress or optimize its references.
|
||||
/// This mechanism is implementation specific. For on-disk reference databases,
|
||||
/// for example, this may pack all loose references.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
void compress(Pointer<git_refdb> refdb) {
|
||||
final error = libgit2.git_refdb_compress(refdb);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
}
|
||||
}
|
||||
void compress(Pointer<git_refdb> refdb) => libgit2.git_refdb_compress(refdb);
|
||||
|
||||
/// Close an open reference database to release memory.
|
||||
void free(Pointer<git_refdb> refdb) => libgit2.git_refdb_free(refdb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue