MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / FuzzBase64Encode

Function FuzzBase64Encode

conversion/base64_test.go:113–123  ·  view source on GitHub ↗
(f *testing.F)

Source from the content-addressed store, hash-verified

111}
112
113func FuzzBase64Encode(f *testing.F) {
114 f.Add([]byte("hello"))
115 f.Fuzz(func(t *testing.T, input []byte) {
116 result := Base64Decode(Base64Encode(input))
117 for i := 0; i < len(input); i++ {
118 if result[i] != input[i] {
119 t.Fatalf("with input '%s' - expected '%s', got '%s' (mismatch at position %d)", input, input, result, i)
120 }
121 }
122 })
123}

Callers

nothing calls this directly

Calls 3

Base64DecodeFunction · 0.85
Base64EncodeFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected