Refactor error messages in spelling tests

Modified the error messages in spelling tests within spelling_test.go to improve clarity and readability. These adjustments involve changing the format specifiers in the error messages of 'ConvertByteToWord' function tests to correspond with the expected data types for better error reporting.
This commit is contained in:
Winni Neessen 2024-03-08 16:04:16 +01:00
parent 93f092e690
commit bd654d40b8
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -42,11 +42,11 @@ func TestConvertByteToWord(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
got, err := ConvertByteToWord(tt.char)
if (err != nil) != tt.wantErr {
t.Errorf("ConvertByteToWord() error = %v, wantErr %v", err, tt.wantErr)
t.Errorf("ConvertByteToWord() error = %s, wantErr %t", err, tt.wantErr)
return
}
if got != tt.want {
t.Errorf("ConvertByteToWord() got = %v, want %v", got, tt.want)
t.Errorf("ConvertByteToWord() got = %s, want %s", got, tt.want)
}
})
}