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
|
@ -152,6 +152,19 @@ index e69de29..0000000
|
|||
patch.free();
|
||||
});
|
||||
|
||||
test('creates from empty blob and buffer', () {
|
||||
final patch = Patch.fromBlobAndBuffer(
|
||||
blob: null,
|
||||
buffer: newBuffer,
|
||||
blobPath: path,
|
||||
bufferPath: path,
|
||||
);
|
||||
|
||||
expect(patch.text, blobPatchAdd);
|
||||
|
||||
patch.free();
|
||||
});
|
||||
|
||||
test('throws when trying to create from diff and error occurs', () {
|
||||
expect(
|
||||
() => Patch.fromDiff(diff: Diff(nullptr), index: 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue