mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Cleanup: remove unnecessary if statements
The assert package is already very good at displaying errors, including printing a diff of expected and actual value, so there's no point in printing the same information again ourselves.
This commit is contained in:
@ -79,9 +79,7 @@ func TestGetPadWidths(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
output := getPadWidths(test.input)
|
||||
if !assert.EqualValues(t, output, test.expected) {
|
||||
t.Errorf("getPadWidths(%v) = %v, want %v", test.input, output, test.expected)
|
||||
}
|
||||
assert.EqualValues(t, output, test.expected)
|
||||
}
|
||||
}
|
||||
|
||||
@ -219,8 +217,6 @@ func TestRenderDisplayStrings(t *testing.T) {
|
||||
|
||||
for _, test := range tests {
|
||||
output := RenderDisplayStrings(test.input, test.columnAlignments)
|
||||
if !assert.EqualValues(t, output, test.expected) {
|
||||
t.Errorf("RenderDisplayStrings(%v) = %v, want %v", test.input, output, test.expected)
|
||||
}
|
||||
assert.EqualValues(t, output, test.expected)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user