From 0bac51746d4717caae26f281ef2e738185419e5e Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Wed, 23 Oct 2024 11:29:04 +0200 Subject: [PATCH] Add error handling for base64 decoding in test This commit adds a check for errors when decoding base64 strings in the b64linebreaker_test.go file. If an error occurs, it logs a meaningful error message, improving the test's robustness and clarity. --- b64linebreaker_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/b64linebreaker_test.go b/b64linebreaker_test.go index 06599d2..370fa41 100644 --- a/b64linebreaker_test.go +++ b/b64linebreaker_test.go @@ -255,6 +255,9 @@ func FuzzBase64LineBreaker(f *testing.F) { } decode, err := base64.StdEncoding.DecodeString(buffer.String()) + if err != nil { + t.Errorf("failed to decode base64 data: %s", err) + } if !bytes.Equal(data, decode) { t.Error("generated line breaker output differs from original data") }