MCPcopy
hub / github.com/gofiber/fiber / FuzzUtilsGetOffer

Function FuzzUtilsGetOffer

helpers_fuzz_test.go:10–23  ·  view source on GitHub ↗

go test -v -run=^$ -fuzz=FuzzUtilsGetOffer

(f *testing.F)

Source from the content-addressed store, hash-verified

8
9// go test -v -run=^$ -fuzz=FuzzUtilsGetOffer
10func FuzzUtilsGetOffer(f *testing.F) {
11 inputs := []string{
12 `application/json; v=1; foo=bar; q=0.938; extra=param, text/plain;param="big fox"; q=0.43`,
13 `text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8`,
14 `*/*`,
15 `text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c`,
16 }
17 for _, input := range inputs {
18 f.Add(input)
19 }
20 f.Fuzz(func(_ *testing.T, spec string) {
21 getOffer([]byte(spec), acceptsOfferType, `application/json;version=1;v=1;foo=bar`, `text/plain;param="big fox"`)
22 })
23}

Callers

nothing calls this directly

Calls 2

getOfferFunction · 0.85
AddMethod · 0.65

Tested by

no test coverage detected