refactor(git_types): use enums

Use Dart's new feature "Enhanced enums with members".
This commit is contained in:
Aleksey Kulikov 2022-05-05 13:05:00 +03:00
parent 984b44d992
commit eafd12d588
13 changed files with 863 additions and 1512 deletions

View file

@ -471,13 +471,13 @@ index e69de29..c217c63 100644
newTree: Tree.lookup(repo: repo, oid: repo.index.writeTree()),
);
expect(
diff.deltas.singleWhere((e) => e.newFile.path == 'staged_new').status,
diff.deltas.firstWhere((e) => e.newFile.path == 'staged_new').status,
GitDelta.added,
);
diff.findSimilar();
expect(
diff.deltas.singleWhere((e) => e.newFile.path == 'staged_new').status,
diff.deltas.firstWhere((e) => e.newFile.path == 'staged_new').status,
GitDelta.renamed,
);
});