Skip to content

Commit

Permalink
synchro: add fuzzer for ParseISO
Browse files Browse the repository at this point in the history
  • Loading branch information
uji committed Feb 23, 2024
1 parent 2206fae commit 8327009
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions synchro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

0 comments on commit 8327009

Please sign in to comment.