diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2024-01-09 13:01:31 +0100 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2024-01-09 13:01:31 +0100 |
commit | a04cd8c39f312da01be79e085b0cb4b643f9614b (patch) | |
tree | a0e50cc3aa75c4e89331c8466764c6ddb96fa2f5 /cookie_test.go | |
parent | refactor: move manually created tchar table to bytesconv_table_gen (#1689) (diff) | |
download | fasthttp-a04cd8c39f312da01be79e085b0cb4b643f9614b.tar.gz fasthttp-a04cd8c39f312da01be79e085b0cb4b643f9614b.tar.bz2 fasthttp-a04cd8c39f312da01be79e085b0cb4b643f9614b.zip |
Move Fuzz tests into their own file
This is required for https://github.com/google/oss-fuzz/pull/11453
Diffstat (limited to 'cookie_test.go')
-rw-r--r-- | cookie_test.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/cookie_test.go b/cookie_test.go index df9568c..b4b81ac 100644 --- a/cookie_test.go +++ b/cookie_test.go @@ -1,7 +1,6 @@ package fasthttp import ( - "bytes" "strings" "testing" "time" @@ -16,27 +15,6 @@ func TestCookiePanic(t *testing.T) { } } -func FuzzCookieParse(f *testing.F) { - inputs := []string{ - `xxx=yyy`, - `xxx=yyy; expires=Tue, 10 Nov 2009 23:00:00 GMT; domain=foobar.com; path=/a/b`, - " \n\t\"", - } - for _, input := range inputs { - f.Add([]byte(input)) - } - c := AcquireCookie() - defer ReleaseCookie(c) - f.Fuzz(func(t *testing.T, cookie []byte) { - _ = c.ParseBytes(cookie) - - w := bytes.Buffer{} - if _, err := c.WriteTo(&w); err != nil { - t.Fatalf("unexpected error: %v", err) - } - }) -} - func TestCookieValueWithEqualAndSpaceChars(t *testing.T) { t.Parallel() |