Refactor error message in mode_test.go

The error message format in `ModesFromFlags()` method within `mode_test.go` has been refactored. The refactoring improved the clarity and conciseness of error reporting when the expected mode is not found during test execution.
This commit is contained in:
Winni Neessen 2024-03-08 17:08:05 +01:00
parent 72576961e6
commit 1c22c9b8f0
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -84,8 +84,7 @@ func TestModesFromFlags(t *testing.T) {
mm := ModesFromFlags(tc.ms) mm := ModesFromFlags(tc.ms)
for _, tm := range tc.mode { for _, tm := range tc.mode {
if !MaskHasMode(mm, tm) { if !MaskHasMode(mm, tm) {
t.Errorf("ModesFromFlags() failed, expected mode %q not found", t.Errorf("ModesFromFlags() failed, expected mode %q not found", tm)
tm)
} }
} }
}) })