mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
test: improve coverage (#44)
This commit is contained in:
parent
bad5e20581
commit
7b57c41253
17 changed files with 171 additions and 40 deletions
|
@ -249,18 +249,6 @@ void main() {
|
|||
expect(repo.getAttribute(path: 'file.sh', name: 'eol'), 'lf');
|
||||
});
|
||||
|
||||
test('checks if commit is a descendant of another commit', () {
|
||||
final commit1 = Commit.lookup(repo: repo, oid: repo['821ed6e8']);
|
||||
final commit2 = Commit.lookup(repo: repo, oid: repo['78b8bf12']);
|
||||
|
||||
expect(commit1.descendantOf(commit2), true);
|
||||
expect(commit1.descendantOf(commit1), false);
|
||||
expect(commit2.descendantOf(commit1), false);
|
||||
|
||||
commit1.free();
|
||||
commit2.free();
|
||||
});
|
||||
|
||||
test('returns number of ahead behind commits', () {
|
||||
final commit1 = Commit.lookup(repo: repo, oid: repo['821ed6e']);
|
||||
final commit2 = Commit.lookup(repo: repo, oid: repo['c68ff54']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue