mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
style: use Object instead of dynamic
This commit is contained in:
parent
1972c6d1ab
commit
beed516c89
13 changed files with 84 additions and 56 deletions
|
@ -8,7 +8,7 @@ void main() {
|
|||
late Directory tmpDir;
|
||||
late Signature sig1;
|
||||
late Signature sig2;
|
||||
var hunks = <Map<String, dynamic>>[];
|
||||
var hunks = <Map<String, Object>>[];
|
||||
|
||||
setUp(() {
|
||||
tmpDir = setupRepo(Directory('test/assets/blamerepo/'));
|
||||
|
|
|
@ -146,7 +146,7 @@ index e69de29..0000000
|
|||
final a = repo.lookupBlob(
|
||||
repo['e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'],
|
||||
);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: a,
|
||||
b: 'Feature edit\n',
|
||||
aPath: path,
|
||||
|
@ -162,7 +162,7 @@ index e69de29..0000000
|
|||
final a = repo.lookupBlob(
|
||||
repo['e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'],
|
||||
);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: a,
|
||||
b: null,
|
||||
aPath: path,
|
||||
|
|
|
@ -52,7 +52,7 @@ index e69de29..0000000
|
|||
|
||||
group('Patch', () {
|
||||
test('successfully creates from buffers', () {
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: oldBlob,
|
||||
b: newBlob,
|
||||
aPath: path,
|
||||
|
@ -66,7 +66,7 @@ index e69de29..0000000
|
|||
});
|
||||
|
||||
test('successfully creates from one buffer (add)', () {
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: null,
|
||||
b: newBlob,
|
||||
aPath: path,
|
||||
|
@ -79,7 +79,7 @@ index e69de29..0000000
|
|||
});
|
||||
|
||||
test('successfully creates from one buffer (delete)', () {
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: oldBlob,
|
||||
b: null,
|
||||
aPath: path,
|
||||
|
@ -94,7 +94,7 @@ index e69de29..0000000
|
|||
test('successfully creates from blobs', () {
|
||||
final a = repo.lookupBlob(oldBlobID);
|
||||
final b = repo.lookupBlob(newBlobID);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: a,
|
||||
b: b,
|
||||
aPath: path,
|
||||
|
@ -108,7 +108,7 @@ index e69de29..0000000
|
|||
|
||||
test('successfully creates from one blob (add)', () {
|
||||
final b = repo.lookupBlob(newBlobID);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: null,
|
||||
b: b,
|
||||
aPath: path,
|
||||
|
@ -122,7 +122,7 @@ index e69de29..0000000
|
|||
|
||||
test('successfully creates from one blob (delete)', () {
|
||||
final a = repo.lookupBlob(oldBlobID);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: a,
|
||||
b: null,
|
||||
aPath: path,
|
||||
|
@ -136,7 +136,7 @@ index e69de29..0000000
|
|||
|
||||
test('successfully creates from blob and buffer', () {
|
||||
final a = repo.lookupBlob(oldBlobID);
|
||||
final patch = Patch.createFrom(
|
||||
final patch = Patch.create(
|
||||
a: a,
|
||||
b: newBlob,
|
||||
aPath: path,
|
||||
|
@ -153,7 +153,7 @@ index e69de29..0000000
|
|||
repo['fc38877b2552ab554752d9a77e1f48f738cca79b'],
|
||||
);
|
||||
expect(
|
||||
() => Patch.createFrom(
|
||||
() => Patch.create(
|
||||
a: commit,
|
||||
b: null,
|
||||
aPath: 'file',
|
||||
|
@ -163,7 +163,7 @@ index e69de29..0000000
|
|||
);
|
||||
|
||||
expect(
|
||||
() => Patch.createFrom(
|
||||
() => Patch.create(
|
||||
a: null,
|
||||
b: commit,
|
||||
aPath: 'file',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue