style: stricter linting

This commit is contained in:
Aleksey Kulikov 2022-02-23 11:05:14 +03:00
parent d0f7746a01
commit 2eb50dec69
12 changed files with 47 additions and 27 deletions

View file

@ -32,7 +32,7 @@ void main() {
});
test('throws when trying to get odb and error occurs', () {
expect(() => Repository((nullptr)).odb, throwsA(isA<LibGit2Error>()));
expect(() => Repository(nullptr).odb, throwsA(isA<LibGit2Error>()));
});
test('creates new odb with no backends', () {

View file

@ -166,7 +166,7 @@ void main() {
final duplicate = ref.duplicate();
expect(repo.references.length, 6);
expect(duplicate, equals(ref));
expect(duplicate.equals(ref), true);
duplicate.free();
ref.free();
@ -519,10 +519,10 @@ void main() {
final ref2 = Reference.lookup(repo: repo, name: 'refs/heads/master');
final ref3 = Reference.lookup(repo: repo, name: 'refs/heads/feature');
expect(ref1 == ref2, true);
expect(ref1 != ref2, false);
expect(ref1 == ref3, false);
expect(ref1 != ref3, true);
expect(ref1.equals(ref2), true);
expect(ref1.notEquals(ref2), false);
expect(ref1.equals(ref3), false);
expect(ref1.notEquals(ref3), true);
ref1.free();
ref2.free();

View file

@ -65,7 +65,7 @@ void main() {
var headParse = RevParse.ext(repo: repo, spec: 'master');
expect(headParse.object.oid.sha, headSHA);
expect(headParse.reference, masterRef);
expect(headParse.reference?.equals(masterRef), true);
expect(headParse.toString(), contains('RevParse{'));
masterRef.free();
@ -82,7 +82,7 @@ void main() {
headParse.object.oid.sha,
'5aecfa0fb97eadaac050ccb99f03c3fb65460ad4',
);
expect(headParse.reference, featureRef);
expect(headParse.reference?.equals(featureRef), true);
featureRef.free();
headParse.object.free();