mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: use Oid instead of String for arguments
This commit is contained in:
parent
23787adc3a
commit
1972c6d1ab
39 changed files with 264 additions and 290 deletions
|
@ -7,13 +7,13 @@ void main() {
|
|||
late Repository repo;
|
||||
late Tag tag;
|
||||
late Directory tmpDir;
|
||||
late Oid tagID;
|
||||
late Oid tagOid;
|
||||
|
||||
setUp(() {
|
||||
tmpDir = setupRepo(Directory('test/assets/testrepo/'));
|
||||
repo = Repository.open(tmpDir.path);
|
||||
tagID = repo['f0fdbf506397e9f58c59b88dfdd72778ec06cc0c'];
|
||||
tag = repo.lookupTag(tagID);
|
||||
tagOid = repo['f0fdbf506397e9f58c59b88dfdd72778ec06cc0c'];
|
||||
tag = repo.lookupTag(tagOid);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
|
@ -37,7 +37,7 @@ void main() {
|
|||
final target = tag.target as Commit;
|
||||
final tagger = tag.tagger;
|
||||
|
||||
expect(tag.id, tagID);
|
||||
expect(tag.oid, tagOid);
|
||||
expect(tag.name, 'v0.2');
|
||||
expect(tag.message, 'annotated tag\n');
|
||||
expect(target.message, 'add subdirectory file\n');
|
||||
|
@ -69,11 +69,11 @@ void main() {
|
|||
final tagger = newTag.tagger;
|
||||
final newTagTarget = newTag.target as Commit;
|
||||
|
||||
expect(newTag.id.sha, '131a5eb6b7a880b5096c550ee7351aeae7b95a42');
|
||||
expect(newTag.oid.sha, '131a5eb6b7a880b5096c550ee7351aeae7b95a42');
|
||||
expect(newTag.name, tagName);
|
||||
expect(newTag.message, message);
|
||||
expect(tagger, signature);
|
||||
expect(newTagTarget.id, target);
|
||||
expect(newTagTarget.oid, target);
|
||||
|
||||
newTag.free();
|
||||
newTagTarget.free();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue