From 8327009ddead7b05ad8453b71213dd72dc57da05 Mon Sep 17 00:00:00 2001 From: uji Date: Wed, 21 Feb 2024 23:58:37 +0900 Subject: [PATCH] synchro: add fuzzer for ParseISO --- .github/workflows/test.yml | 2 ++ synchro_test.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf3224e..784f326 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,3 +36,5 @@ jobs: uses: codecov/codecov-action@v3 with: files: ${{ steps.vars.outputs.coverage_txt }} + - name: Fuzzing synchro pakcage + run: go test . -fuzz=Fuzz -fuzztime=180s \ No newline at end of file diff --git a/synchro_test.go b/synchro_test.go index 72429ac..34e336c 100644 --- a/synchro_test.go +++ b/synchro_test.go @@ -204,3 +204,9 @@ func TestParseISO(t *testing.T) { }) } + +func FuzzParseISO(f *testing.F) { + f.Fuzz(func(t *testing.T, str string) { + _, _ = synchro.ParseISO[tz.UTC](str) + }) +}