adds nice git interface
This commit is contained in:
@@ -218,15 +218,17 @@ private func makeModel(results: [String: [ContentGroup]] = [:], delays: [String:
|
||||
#expect(model.emptyMessage(for: .files) == "No file names match.")
|
||||
}
|
||||
|
||||
@Test func theFocusedColumnTakesSeventyPercentAndTheSidesKeepTheirMinimum() {
|
||||
let three: [SearchModel.Column] = [.thisFile, .project, .files]
|
||||
let resting = SearchModel.widths(total: 1000, columns: three, focused: .project)
|
||||
#expect(resting[.thisFile] == 230)
|
||||
#expect(resting[.files] == 250)
|
||||
#expect(resting[.project] == 520)
|
||||
let files = SearchModel.widths(total: 1000, columns: three, focused: .files)
|
||||
#expect(files[.files] == 700)
|
||||
#expect(files[.thisFile] == 180)
|
||||
#expect(files[.project] == 120)
|
||||
@Test func withThisFileTheColumnsTakeThirtyFortyFiveAndTwentyFivePercent() {
|
||||
let widths = SearchModel.widths(total: 1000, columns: [.thisFile, .project, .files])
|
||||
#expect(widths[.thisFile] == 300)
|
||||
#expect(widths[.project] == 450)
|
||||
#expect(widths[.files] == 250)
|
||||
}
|
||||
|
||||
@Test func withoutThisFileTheColumnsTakeSixtyFiveAndThirtyFivePercent() {
|
||||
let widths = SearchModel.widths(total: 1000, columns: [.project, .files])
|
||||
#expect(widths[.thisFile] == nil)
|
||||
#expect(widths[.project] == 650)
|
||||
#expect(widths[.files] == 350)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user