mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
feat: add ability to compare objects (#54)
This commit is contained in:
parent
5dfedadfe6
commit
bad40bdb61
45 changed files with 466 additions and 137 deletions
|
@ -230,5 +230,25 @@ index e69de29..0000000
|
|||
expect(patch.hunks[0].toString(), contains('DiffHunk{'));
|
||||
expect(patch.hunks[0].lines[0].toString(), contains('DiffLine{'));
|
||||
});
|
||||
|
||||
test('supports value comparison', () {
|
||||
final patch = Patch.fromBuffers(
|
||||
oldBuffer: oldBuffer,
|
||||
newBuffer: newBuffer,
|
||||
oldBufferPath: path,
|
||||
newBufferPath: path,
|
||||
);
|
||||
final anotherPatch = Patch.fromBuffers(
|
||||
oldBuffer: oldBuffer,
|
||||
newBuffer: newBuffer,
|
||||
oldBufferPath: path,
|
||||
newBufferPath: path,
|
||||
);
|
||||
expect(patch, equals(anotherPatch));
|
||||
expect(patch.hunks[0], equals(patch.hunks[0]));
|
||||
|
||||
final hunk = patch.hunks[0];
|
||||
expect(hunk.lines[0], equals(hunk.lines[0]));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue